X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fparse.c;h=da26232ec4958ffd9f6bc1cbefd851034c118a42;hb=c02105285c8027ba887ca0453b64b8415d5bb8fd;hp=b718827e02d5aaab03791df3992b2b8b2d818a68;hpb=6aa0809ced1af61934e5ec94fff2474c0ef8b6b4;p=ircu2.10.12-pk.git diff --git a/ircd/parse.c b/ircd/parse.c index b718827..da26232 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -996,8 +996,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 +1005,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);