summaryrefslogtreecommitdiff
path: root/src/modules/m_ojoin.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-26 17:52:13 +0200
committerattilamolnar <attilamolnar@hush.com>2012-10-24 17:19:16 +0200
commit9fe15c5988f3eea038a4f495566fb1c26be1d1cd (patch)
tree0547fb0e4f1396f98e203723f1ce896adfbae304 /src/modules/m_ojoin.cpp
parentc244b6686cdd906e126542609ee27d913131d66d (diff)
m_ojoin Fix giving +Y only instead of +Yo when <ojoin:op> is on and the user is already in the channel
Diffstat (limited to 'src/modules/m_ojoin.cpp')
-rw-r--r--src/modules/m_ojoin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index fcb267750..e16fe3588 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -87,8 +87,10 @@ class CommandOjoin : public Command
// they're already in the channel
std::vector<std::string> modes;
modes.push_back(parameters[0]);
- modes.push_back("+Y");
+ modes.push_back(op ? "+Yo" : "+Y");
modes.push_back(user->nick);
+ if (op)
+ modes.push_back(user->nick);
ServerInstance->SendGlobalMode(modes, ServerInstance->FakeClient);
}
return CMD_SUCCESS;