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/mode.cpp | |
parent | 3624c137a6db85eaab0372550c9dca79d6d21e55 (diff) |
Replace void* dest and target_type parameters of OnMode with a User* and a Channel*
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 12 |
1 files changed, 4 insertions, 8 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) { |