diff options
| author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-01 22:07:10 +0000 |
|---|---|---|
| committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-01 22:07:10 +0000 |
| commit | 60b861ee251a7d9cc351545fe2314a400a4e81b3 (patch) | |
| tree | 12412fc5d6571769605379b43b8e8d4f420d8c36 /src/botserv.c | |
| parent | e46bc26a06cecb72ffe8587ec84997d89b75d852 (diff) | |
Nuke struct Uid from the core. (hooray!)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1296 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
| -rw-r--r-- | src/botserv.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/botserv.c b/src/botserv.c index 745acb47c..ea31d70f7 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -589,30 +589,21 @@ void insert_bot(BotInfo * bi) BotInfo *findbot(const char *nick) { - BotInfo *bi; - Uid *ud; + BotInfo *bi; - /* to keep make strict happy */ - ud = NULL; + if (!nick || !*nick) + return NULL; - if (!nick || !*nick) - return NULL; + for (bi = botlists[tolower(*nick)]; bi; bi = bi->next) + { + if (!stricmp(nick, bi->nick)) + return bi; - for (bi = botlists[tolower(*nick)]; bi; bi = bi->next) { - if (UseTS6 && ircd->ts6) { - ud = find_nickuid(nick); - } - if (!stricmp(nick, bi->nick)) { - return bi; - } - if (ud && UseTS6 && ircd->ts6) { - if (!stricmp(ud->nick, bi->nick)) { - return bi; - } - } - } + if (nick == bi->uid) + return bi; + } - return NULL; + return NULL; } /*************************************************************************/ |
