diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-03 22:30:33 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-03 22:30:33 +0000 |
commit | 16a90d28f61707b2f053b163e33c6678bd861971 (patch) | |
tree | a67784e553135ab1a519ff5ee685a07702f4573a /src/botserv.c | |
parent | dc44944c713d5d19a7d6e7fa443dde03fe4d9832 (diff) |
Undo me smoking a nice pipe of craq on UID support (no wonder this wasn't working), and fix findbot() to do what we want.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1524 5417fbe8-f217-4b02-8779-1006273d7864
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 |