summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
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)
{