diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-02 04:55:43 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-02 04:55:43 +0000 |
| commit | 3617d7978899f830d952d9bac70ed14bb0cc0fd6 (patch) | |
| tree | fa5fe5d8f8f3bd87f649e2467f60e1d87ba2a71c /src/botserv.c | |
| parent | 657e1deb590eaba38ea3e9a9fb353dc0e23c1a41 (diff) | |
Convert 'const char *' and 'char *' function arguments to 'const std::string &' instead, done in actions.c along with chain reactions in other files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2723 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
| -rw-r--r-- | src/botserv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/botserv.c b/src/botserv.c index 9dc7e3ed1..bbe3f30c9 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -483,13 +483,15 @@ void insert_bot(BotInfo * bi) /*************************************************************************/ /*************************************************************************/ -BotInfo *findbot(const char *nick) +BotInfo *findbot(const std::string &nick) { BotInfo *bi; - if (!nick || !*nick) + if (nick.empty()) return NULL; + ci::string ci_nick(nick.c_str()); + /* * XXX Less than efficient, but we need to do this for good TS6 support currently. This *will* improve. -- w00t */ @@ -497,10 +499,10 @@ BotInfo *findbot(const char *nick) { for (bi = botlists[i]; bi; bi = bi->next) { - if (!stricmp(nick, bi->nick)) + if (ci_nick == bi->nick) return bi; - if (nick == bi->uid) + if (ci_nick == bi->uid) return bi; } } |
