diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-13 18:20:10 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-13 18:20:10 +0200 |
commit | ac72c53ce2425801e135ab57c5defa707adcef5d (patch) | |
tree | 18f34c8f8c51deb24fb64e7a8caf02d326abb936 /src | |
parent | 3624c137a6db85eaab0372550c9dca79d6d21e55 (diff) |
Replace void* dest and target_type parameters of OnMode with a User* and a Channel*
Diffstat (limited to 'src')
-rw-r--r-- | src/mode.cpp | 12 | ||||
-rw-r--r-- | src/modules.cpp | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 63008f45c..9c38afaad 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -469,15 +469,11 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User* user, ServerInstance->PI->SendMode(user, targetuser, targetchannel, LastParseParams, LastParseTranslate); if (targetchannel) - { - targetchannel->WriteChannel(user, "MODE %s", LastParse.c_str()); - FOREACH_MOD(I_OnMode,OnMode(user, targetchannel, TYPE_CHANNEL, LastParseParams, LastParseTranslate)); - } + targetchannel->WriteChannel(user, "MODE " + LastParse); else - { - targetuser->WriteFrom(user, "MODE %s", LastParse.c_str()); - FOREACH_MOD(I_OnMode,OnMode(user, targetuser, TYPE_USER, LastParseParams, LastParseTranslate)); - } + targetuser->WriteFrom(user, "MODE " + LastParse); + + FOREACH_MOD(I_OnMode,OnMode(user, targetuser, targetchannel, LastParseParams, LastParseTranslate)); } else if (targetchannel && parameters.size() == 2) { diff --git a/src/modules.cpp b/src/modules.cpp index 039e01421..58a77faff 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -87,7 +87,7 @@ void Module::OnPreRehash(User*, const std::string&) { } void Module::OnModuleRehash(User*, const std::string&) { } void Module::OnRehash(User*) { } ModResult Module::OnUserPreJoin(LocalUser*, Channel*, const std::string&, std::string&, const std::string&) { return MOD_RES_PASSTHRU; } -void Module::OnMode(User*, void*, int, const std::vector<std::string>&, const std::vector<TranslateType>&) { } +void Module::OnMode(User*, User*, Channel*, const std::vector<std::string>&, const std::vector<TranslateType>&) { } void Module::OnOper(User*, const std::string&) { } void Module::OnPostOper(User*, const std::string&, const std::string &) { } void Module::OnInfo(User*) { } |