Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / parse.c
index b718827e02d5aaab03791df3992b2b8b2d818a68..700eec655f2e28616e8c7a48a6e1415bad2ebc22 100644 (file)
@@ -448,11 +448,7 @@ struct Message msgtab[] = {
     TOK_JUPE,
     0, MAXPARA, MFLG_SLOW, 0,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
-#ifdef CONFIG_OPERCMDS
     { m_unregistered, m_jupe, ms_jupe, mo_jupe, m_ignore }
-#else
-    { m_unregistered, m_jupe, ms_jupe, m_jupe, m_ignore }
-#endif /* CONFIG_OPERCMDS */
   },
   {
     MSG_OPMODE,
@@ -996,8 +992,7 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
       return 0;
     }
   }
-  else if (Protocol(cptr) > 9)  /* Well, not ALWAYS, 2.9 can send no prefix */
-  {
+  else {
     char numeric_prefix[6];
     int  i;
     for (i = 0; i < 5; ++i) {
@@ -1006,12 +1001,17 @@ int parse_server(struct Client *cptr, char *buffer, char *bufend)
       }
     }
     numeric_prefix[i] = '\0';
+
     /*
      * We got a numeric nick as prefix
      * 1 or 2 character prefixes are from servers
      * 3 or 5 chars are from clients
      */
-    if (' ' == ch[1] || ' ' == ch[2])
+    if (0 == i) {
+      protocol_violation(cptr,"Missing Prefix");
+      from = cptr;
+    }
+    else if (' ' == ch[1] || ' ' == ch[2])
       from = FindNServer(numeric_prefix);
     else 
       from = findNUser(numeric_prefix);