summaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-04 06:40:24 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-04 06:40:24 +0000
commitb462814760cb7c0830072275acc97291a9fb905b (patch)
tree56cfe6caee408eb852f728cd8aaa2d18e4365228 /src/init.c
parent2708eea5d13c249143b83fbaa8b552992f0ac8b6 (diff)
Changed 'char *' fields in BotInfo to 'std::string', cleanup of bots.cpp, changed many other functions to use 'const std::string &' arguments as a chain reaction.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2733 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/init.c b/src/init.c
index bde426578..cd53e67bf 100644
--- a/src/init.c
+++ b/src/init.c
@@ -21,7 +21,7 @@ extern void moduleAddIRCDMsgs();
/*************************************************************************/
-void introduce_user(const char *user)
+void introduce_user(const std::string &user)
{
/* Watch out for infinite loops... */
@@ -37,12 +37,13 @@ void introduce_user(const char *user)
int i;
/* XXX: it might be nice to have this inside BotInfo's constructor, or something? */
- for (i = 0; i < 256; i++)
+ for (i = 0; i < 256; ++i)
{
for (bi = botlists[i]; bi; bi = bi->next)
{
- if (!user || !stricmp(user, bi->nick))
- ircdproto->SendClientIntroduction(bi->nick, bi->user, bi->host, bi->real, ircd->pseudoclient_mode, bi->uid.c_str());
+ ci::string ci_bi_nick(bi->nick.c_str());
+ if (user.empty() || ci_bi_nick == user)
+ ircdproto->SendClientIntroduction(bi->nick, bi->user, bi->host, bi->real, ircd->pseudoclient_mode, bi->uid);
}
}
}