diff options
Diffstat (limited to 'src/botserv.c')
-rw-r--r-- | src/botserv.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/botserv.c b/src/botserv.c index 2aeca8249..14d8249e2 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -558,20 +558,27 @@ BotInfo *findbot(const char *nick) BotInfo *bi; if (!nick || !*nick) - return NULL; + return NULL; - for (bi = botlists[tolower(*nick)]; bi; bi = bi->next) + /* + * XXX Less than efficient, but we need to do this for good TS6 support currently. This *will* improve. -- w00t + */ + for (int i = 0; i < 256; i++) { - if (!stricmp(nick, bi->nick)) - return bi; - - if (nick == bi->uid) - return bi; + for (bi = botlists[i]; bi; bi = bi->next) + { + if (!stricmp(nick, bi->nick)) + return bi; + + if (nick == bi->uid) + return bi; + } } return NULL; } + /*************************************************************************/ /* Returns ban data associated with an user if it exists, allocates it |