Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / parse.c
index 45c11ed3e07f01fe284a822653cea3a1da92ed01..2a4287b1caafa577369d72cbc0f40d988a6c96f6 100644 (file)
@@ -354,7 +354,11 @@ struct Message msgtab[] = {
     TOK_OPER,
     0, MAXPARA, MFLG_SLOW, 0,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
+#ifndef NOOPER    
     { m_unregistered, m_oper, ms_oper, mo_oper, m_ignore }
+#else
+    { m_unregistered, m_oper, m_ignore, m_ignore, m_ignore }
+#endif
   },
   {
     MSG_CONNECT,
@@ -765,7 +769,7 @@ int parse_client(struct Client *cptr, char *buffer, char *bufend)
   struct Message* mptr;
   MessageHandler  handler = 0;
 
-  Debug((DEBUG_DEBUG, "Parsing: %s", buffer));
+  Debug((DEBUG_DEBUG, "Client Parsing: %s", buffer));
 
   if (IsDead(cptr))
     return 0;
@@ -910,7 +914,7 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
   int             paramcount;
   struct Message* mptr;
 
-  Debug((DEBUG_DEBUG, "Parsing: %s", buffer));
+  Debug((DEBUG_DEBUG, "Server Parsing: %s", buffer));
 
 #ifdef GODMODE
   len = strlen(buffer);
@@ -1084,7 +1088,7 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
   if (len == 3 && IsDigit(*ch))
   {
     numeric = (*ch - '0') * 100 + (*(ch + 1) - '0') * 10 + (*(ch + 2) - '0');
-    paramcount = MAXPARA;
+    paramcount = 2; /* destination, and the rest of it */
     ServerStats->is_num++;
     mptr = NULL;                /* Init. to avoid stupid compiler warning :/ */
   }
@@ -1179,7 +1183,10 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
          * The rest is single parameter--can
          * include blanks also.
          */
-        para[++i] = s + 1;
+       if (numeric)
+         para[++i] = s; /* preserve the colon to make do_numeric happy */
+       else
+         para[++i] = s + 1;
         break;
       }
       para[++i] = s;