summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-13 18:20:10 +0200
committerattilamolnar <attilamolnar@hush.com>2013-06-13 18:20:10 +0200
commitac72c53ce2425801e135ab57c5defa707adcef5d (patch)
tree18f34c8f8c51deb24fb64e7a8caf02d326abb936 /src/mode.cpp
parent3624c137a6db85eaab0372550c9dca79d6d21e55 (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.cpp12
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)
{