Author: Isomer <isomer@coders.net>
authorPerry Lorier <isomer@undernet.org>
Mon, 29 May 2000 10:37:34 +0000 (10:37 +0000)
committerPerry Lorier <isomer@undernet.org>
Mon, 29 May 2000 10:37:34 +0000 (10:37 +0000)
Log message:

 * Fixed extra space on /names as reported by poptix.
 * Fixed incorrect syntax of ERROR message reported by Mr_RIP

needs testing:
 * Throttle message
 * /names

I've not even tried to compile this, I've been awake for over 24hrs now, if it
doesn't compile, blame someone else other than me? :)

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@240 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_names.c
ircd/s_bsd.c

index 2ca329373c939ba92b393cfc5a654074e4fa0c06..c929282ff07e64b35f7359379daa3775cf40114a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-29  Perry Lorier       <Isomer@coders.net>
+       * ircd/m_names.c: Removed redundant space. 
+       * ircd/s_bsd.c: Fixed incorrect syntax on ERROR line.
+
 2000-05-18  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/m_burst.c (ms_burst): er...that should have been a ",", not
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.137 2000-05-18 23:05:04 kev Exp $
+# $Id: ChangeLog,v 1.138 2000-05-29 10:37:33 isomer Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index 4ff66996aa6c3efb575fb44f27437d49c07bbd5d..525db66baf8f6dee6476e39445e72f86d0f02b3f 100644 (file)
@@ -118,6 +118,7 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   int flag;
   int len;
   int mlen;
+  int needs_space;
   char* s;
   char* para = parc > 1 ? parv[1] : 0;
   char buf[BUFSIZE];
@@ -169,13 +170,15 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       *buf = '@';
     idx = len + 4;
     flag = 1;
+    needs_space = 0;
     for (member = chptr->members; member; member = member->next_member)
     {
       c2ptr = member->user;
-#ifndef GODMODE
-      if (sptr != c2ptr && IsInvisible(c2ptr) && !find_channel_member(sptr, chptr))
-        continue;
-#endif
+      if (needs_space) {
+       strcat(buf, " ");
+        idx++;
+      }
+      needs_space=1;
       if (IsZombie(member))
       {
         if (member->user != sptr)
@@ -197,21 +200,9 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
         idx++;
       }
       strcat(buf, c2ptr->name);
-      strcat(buf, " ");
       idx += strlen(c2ptr->name) + 1;
       flag = 1;
-#ifdef GODMODE
-      {
-        char yxx[6];
-        sprintf_irc(yxx, "%s%s", NumNick(c2ptr));
-        assert(c2ptr == findNUser(yxx));
-        sprintf_irc(buf + strlen(buf), "(%s) ", yxx);
-        idx += 6;
-      }
-      if (mlen + idx + NICKLEN + 11 > BUFSIZE)
-#else
       if (mlen + idx + NICKLEN + 5 > BUFSIZE)
-#endif
         /* space, modifier, nick, \r \n \0 */
       {
        send_reply(sptr, RPL_NAMREPLY, buf);
@@ -225,6 +216,7 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
           *buf = '@';
         idx = len + 4;
         flag = 0;
+        needs_space=0;
       }
     }
     if (flag)
index 2d82dbb80899a114aefd8de1bdac0206877dbcb9..5e85a759c72044c3110e6a6aac2328891ae7678f 100644 (file)
@@ -561,7 +561,7 @@ void add_connection(struct Listener* listener, int fd) {
   time_t             next_target = 0;
 
   const char* const throttle_message =
-         "ERRORYour host is trying to (re)connect too fast -- throttled\r\n";
+         "ERROR :Your host is trying to (re)connect too fast -- throttled\r\n";
        /* 12345678901234567890123456789012345679012345678901234567890123456 */
   
   assert(0 != listener);