diff options
-rw-r--r-- | src/modules/m_services.cpp | 24 | ||||
-rw-r--r-- | src/modules/m_services_account.cpp | 14 | ||||
-rw-r--r-- | src/modules/m_servprotect.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sethost.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_setident.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_setidle.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_setname.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_showwhois.cpp | 2 |
8 files changed, 32 insertions, 32 deletions
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index b62f432da..92c9c6d3a 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -28,14 +28,14 @@ class Channel_r : public ModeHandler ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) { // only a u-lined server may add or remove the +r mode. - if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.')))) + if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server || (source->nick.find('.') != std::string::npos))) { channel->SetMode('r',adding); return MODEACTION_ALLOW; } else { - source->WriteNumeric(500, "%s :Only a server may modify the +r channel mode", source->nick); + source->WriteNumeric(500, "%s :Only a server may modify the +r channel mode", source->nick.c_str()); return MODEACTION_DENY; } } @@ -51,7 +51,7 @@ class User_r : public ModeHandler ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) { - if ((kludgeme) || (ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.')))) + if ((kludgeme) || (ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server || (source->nick.find('.') != std::string::npos))) { if ((adding && !dest->IsModeSet('r')) || (!adding && dest->IsModeSet('r'))) { @@ -62,7 +62,7 @@ class User_r : public ModeHandler } else { - source->WriteNumeric(500, "%s :Only a server may modify the +r user mode", source->nick); + source->WriteNumeric(500, "%s :Only a server may modify the +r user mode", source->nick.c_str()); return MODEACTION_DENY; } } @@ -130,7 +130,7 @@ class ModuleServices : public Module if (dest->IsModeSet('r')) { /* user is registered */ - ServerInstance->SendWhoisLine(source, dest, 307, "%s %s :is a registered nick", source->nick, dest->nick); + ServerInstance->SendWhoisLine(source, dest, 307, "%s %s :is a registered nick", source->nick.c_str(), dest->nick.c_str()); } } @@ -138,7 +138,7 @@ class ModuleServices : public Module virtual void OnUserPostNick(User* user, const std::string &oldnick) { /* On nickchange, if they have +r, remove it */ - if (user->IsModeSet('r') && irc::string(user->nick) != oldnick) + if (user->IsModeSet('r') && assign(user->nick) != oldnick) { std::vector<std::string> modechange; modechange.push_back(user->nick); @@ -159,13 +159,13 @@ class ModuleServices : public Module Channel* c = (Channel*)dest; if ((c->IsModeSet('M')) && (!user->IsModeSet('r'))) { - if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) + if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server))) { // user is ulined, can speak regardless return 0; } // user messaging a +M channel and is not registered - user->WriteNumeric(477, "%s %s :You need a registered nickname to speak on this channel", user->nick, c->name); + user->WriteNumeric(477, "%s %s :You need a registered nickname to speak on this channel", user->nick.c_str(), c->name); return 1; } } @@ -174,13 +174,13 @@ class ModuleServices : public Module User* u = (User*)dest; if ((u->IsModeSet('R')) && (!user->IsModeSet('r'))) { - if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) + if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server))) { // user is ulined, can speak regardless return 0; } // user messaging a +R user and is not registered - user->WriteNumeric(477, "%s %s :You need a registered nickname to message this user", user->nick, u->nick); + user->WriteNumeric(477, "%s %s :You need a registered nickname to message this user", user->nick.c_str(), u->nick.c_str()); return 1; } } @@ -200,13 +200,13 @@ class ModuleServices : public Module { if (!user->IsModeSet('r')) { - if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) + if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server))) { // user is ulined, won't be stopped from joining return 0; } // joining a +R channel and not identified - user->WriteNumeric(477, "%s %s :You need a registered nickname to join this channel", user->nick, chan->name); + user->WriteNumeric(477, "%s %s :You need a registered nickname to join this channel", user->nick.c_str(), chan->name); return 1; } } diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 3ac333b37..db9d90de4 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -70,7 +70,7 @@ class ModuleServicesAccount : public Module if (account) { - ServerInstance->SendWhoisLine(source, dest, 330, "%s %s %s :is logged in as", source->nick, dest->nick, account->c_str()); + ServerInstance->SendWhoisLine(source, dest, 330, "%s %s %s :is logged in as", source->nick.c_str(), dest->nick.c_str(), account->c_str()); } } @@ -90,7 +90,7 @@ class ModuleServicesAccount : public Module if ((c->IsModeSet('M')) && (!account)) { - if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) + if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server))) { // user is ulined, can speak regardless return 0; @@ -107,14 +107,14 @@ class ModuleServicesAccount : public Module if ((u->modes['R'-65]) && (!account)) { - if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) + if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server))) { // user is ulined, can speak regardless return 0; } // user messaging a +R user and is not registered - user->WriteNumeric(477, ""+std::string(user->nick)+" "+std::string(u->nick)+" :You need to be identified to a registered account to message this user"); + user->WriteNumeric(477, ""+ user->nick +" "+ u->nick +" :You need to be identified to a registered account to message this user"); return 1; } } @@ -137,13 +137,13 @@ class ModuleServicesAccount : public Module { if (!account) { - if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) + if ((ServerInstance->ULine(user->nick.c_str())) || (ServerInstance->ULine(user->server))) { // user is ulined, won't be stopped from joining return 0; } // joining a +R channel and not identified - user->WriteNumeric(477, ""+std::string(user->nick)+" "+std::string(chan->name)+" :You need to be identified to a registered account to join this channel"); + user->WriteNumeric(477, user->nick + " " + chan->name + " :You need to be identified to a registered account to join this channel"); return 1; } } @@ -241,7 +241,7 @@ class ModuleServicesAccount : public Module dest->Extend("accountname", text); if (IS_LOCAL(dest)) - dest->WriteNumeric(900, "%s %s %s :You are now logged in as %s", dest->nick, dest->GetFullHost(), text->c_str(), text->c_str()); + dest->WriteNumeric(900, "%s %s %s :You are now logged in as %s", dest->nick.c_str(), dest->GetFullHost().c_str(), text->c_str(), text->c_str()); AccountData ac; ac.user = dest; diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 1dbb9384f..d79e40bef 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -79,7 +79,7 @@ class ModuleServProtectMode : public Module if (dst->IsModeSet('k')) { - src->WriteNumeric(485, "%s :You are not allowed to kill %s Services!", src->nick, ServerInstance->Config->Network); + src->WriteNumeric(485, "%s :You are not allowed to kill %s Services!", src->nick.c_str(), ServerInstance->Config->Network); ServerInstance->SNO->WriteToSnoMask('A', std::string(src->nick)+" tried to kill service "+dst->nick+" ("+reason+")"); return 1; } diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index e781a79aa..ba2cc4f45 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -42,12 +42,12 @@ class CommandSethost : public Command } if (len == 0) { - user->WriteServ("NOTICE %s :*** SETHOST: Host must be specified", user->nick); + user->WriteServ("NOTICE %s :*** SETHOST: Host must be specified", user->nick.c_str()); return CMD_FAILURE; } if (len > 64) { - user->WriteServ("NOTICE %s :*** SETHOST: Host too long",user->nick); + user->WriteServ("NOTICE %s :*** SETHOST: Host too long",user->nick.c_str()); return CMD_FAILURE; } diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index 0456a8539..13f5d0c92 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -31,24 +31,24 @@ class CommandSetident : public Command { if (parameters.size() == 0) { - user->WriteServ("NOTICE %s :*** SETIDENT: Ident must be specified", user->nick); + user->WriteServ("NOTICE %s :*** SETIDENT: Ident must be specified", user->nick.c_str()); return CMD_FAILURE; } if (parameters[0].size() > IDENTMAX) { - user->WriteServ("NOTICE %s :*** SETIDENT: Ident is too long", user->nick); + user->WriteServ("NOTICE %s :*** SETIDENT: Ident is too long", user->nick.c_str()); return CMD_FAILURE; } if (!ServerInstance->IsIdent(parameters[0].c_str())) { - user->WriteServ("NOTICE %s :*** SETIDENT: Invalid characters in ident", user->nick); + user->WriteServ("NOTICE %s :*** SETIDENT: Invalid characters in ident", user->nick.c_str()); return CMD_FAILURE; } user->ChangeIdent(parameters[0].c_str()); - ServerInstance->SNO->WriteToSnoMask('A', "%s used SETIDENT to change their ident to '%s'", user->nick, user->ident); + ServerInstance->SNO->WriteToSnoMask('A', "%s used SETIDENT to change their ident to '%s'", user->nick.c_str(), user->ident.c_str()); return CMD_SUCCESS; } diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index ce191910a..89e8c9a17 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -32,7 +32,7 @@ class CommandSetidle : public Command time_t idle = ServerInstance->Duration(parameters[0]); if (idle < 1) { - user->WriteNumeric(948, "%s :Invalid idle time.",user->nick); + user->WriteNumeric(948, "%s :Invalid idle time.",user->nick.c_str()); return CMD_FAILURE; } user->idle_lastmsg = (ServerInstance->Time() - idle); @@ -40,7 +40,7 @@ class CommandSetidle : public Command if (user->signon > user->idle_lastmsg) user->signon = user->idle_lastmsg; ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used SETIDLE to set their idle time to "+ConvToStr(idle)+" seconds"); - user->WriteNumeric(944, "%s :Idle time set.",user->nick); + user->WriteNumeric(944, "%s :Idle time set.",user->nick.c_str()); return CMD_LOCALONLY; } diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 75156378d..eab376cab 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -31,19 +31,19 @@ class CommandSetname : public Command { if (parameters.size() == 0) { - user->WriteServ("NOTICE %s :*** SETNAME: GECOS must be specified", user->nick); + user->WriteServ("NOTICE %s :*** SETNAME: GECOS must be specified", user->nick.c_str()); return CMD_FAILURE; } if (parameters[0].size() > MAXGECOS) { - user->WriteServ("NOTICE %s :*** SETNAME: GECOS too long", user->nick); + user->WriteServ("NOTICE %s :*** SETNAME: GECOS too long", user->nick.c_str()); return CMD_FAILURE; } if (user->ChangeName(parameters[0].c_str())) { - ServerInstance->SNO->WriteToSnoMask('A', "%s used SETNAME to change their GECOS to %s", user->nick, parameters[0].c_str()); + ServerInstance->SNO->WriteToSnoMask('A', "%s used SETNAME to change their GECOS to %s", user->nick.c_str(), parameters[0].c_str()); return CMD_SUCCESS; } diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 37492f670..c39649896 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -84,7 +84,7 @@ class ModuleShowwhois : public Module { if (IS_LOCAL(dest)) { - dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you.",dest->nick,source->nick,source->ident,source->host); + dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you.",dest->nick.c_str(),source->nick.c_str(),source->ident.c_str(),source->host); } else { |