diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-05 00:18:01 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-05 00:18:01 +0000 |
commit | 5f6955a43ee286925d9f79affcb2fdd5e9306fe6 (patch) | |
tree | 31a239d90de618836cae746040e8f229f209a995 /src/modules/m_globalload.cpp | |
parent | 8e89fe75f9467969bce1dc6930befc6ef273edf6 (diff) |
Convert convert convert
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9624 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_globalload.cpp')
-rw-r--r-- | src/modules/m_globalload.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 2de9be9f6..1c08a48c6 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -27,24 +27,24 @@ class CommandGloadmodule : public Command TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { - std::string servername = pcnt > 1 ? parameters[1] : "*"; + std::string servername = parameters.size() > 1 ? parameters[1] : "*"; if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername)) { - if (ServerInstance->Modules->Load(parameters[0])) + if (ServerInstance->Modules->Load(parameters[0].c_str())) { - ServerInstance->SNO->WriteToSnoMask('A', "NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0],user->nick); - user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick, parameters[0]); + ServerInstance->SNO->WriteToSnoMask('A', "NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0].c_str(), user->nick); + user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick, parameters[0].c_str()); } else { - user->WriteNumeric(974, "%s %s :%s",user->nick, parameters[0],ServerInstance->Modules->LastError().c_str()); + user->WriteNumeric(974, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str()); } } else - ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL LOAD BY '%s' (not loaded here)",parameters[0],user->nick); + ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL LOAD BY '%s' (not loaded here)",parameters[0].c_str(), user->nick); return CMD_SUCCESS; } @@ -61,24 +61,24 @@ class CommandGunloadmodule : public Command syntax = "<modulename> [servermask]"; } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { - std::string servername = pcnt > 1 ? parameters[1] : "*"; + std::string servername = parameters.size() > 1 ? parameters[1] : "*"; if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername)) { - if (ServerInstance->Modules->Unload(parameters[0])) + if (ServerInstance->Modules->Unload(parameters[0].c_str())) { - ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick); - user->WriteNumeric(973, "%s %s :Module successfully unloaded.",user->nick, parameters[0]); + ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0].c_str(), user->nick); + user->WriteNumeric(973, "%s %s :Module successfully unloaded.",user->nick, parameters[0].c_str()); } else { - user->WriteNumeric(972, "%s %s :%s",user->nick, parameters[0],ServerInstance->Modules->LastError().c_str()); + user->WriteNumeric(972, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str()); } } else - ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL UNLOAD BY '%s' (not unloaded here)",parameters[0],user->nick); + ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL UNLOAD BY '%s' (not unloaded here)",parameters[0].c_str(), user->nick); return CMD_SUCCESS; } @@ -95,25 +95,25 @@ class CommandGreloadmodule : public Command syntax = "<modulename> [servermask]"; } - CmdResult Handle(const char* const* parameters, int pcnt, User *user) + CmdResult Handle(const std::vector<std::string> ¶meters, User *user) { - std::string servername = pcnt > 1 ? parameters[1] : "*"; + std::string servername = parameters.size() > 1 ? parameters[1] : "*"; if (ServerInstance->MatchText(ServerInstance->Config->ServerName, servername)) { - if (!ServerInstance->Modules->Unload(parameters[0])) + if (!ServerInstance->Modules->Unload(parameters[0].c_str())) { - user->WriteNumeric(972, "%s %s :%s",user->nick, parameters[0],ServerInstance->Modules->LastError().c_str()); + user->WriteNumeric(972, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str()); } - if (!ServerInstance->Modules->Load(parameters[0])) + if (!ServerInstance->Modules->Load(parameters[0].c_str())) { - user->WriteNumeric(974, "%s %s :%s",user->nick, parameters[0],ServerInstance->Modules->LastError().c_str()); + user->WriteNumeric(974, "%s %s :%s",user->nick, parameters[0].c_str(), ServerInstance->Modules->LastError().c_str()); } - ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY RELOADED BY '%s'",parameters[0],user->nick); - user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick, parameters[0]); + ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBALLY RELOADED BY '%s'",parameters[0].c_str(), user->nick); + user->WriteNumeric(975, "%s %s :Module successfully loaded.",user->nick, parameters[0].c_str()); } else - ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL RELOAD BY '%s' (not reloaded here)",parameters[0],user->nick); + ServerInstance->SNO->WriteToSnoMask('A', "MODULE '%s' GLOBAL RELOAD BY '%s' (not reloaded here)",parameters[0].c_str(), user->nick); return CMD_SUCCESS; } |