diff options
author | Adam <Adam@anope.org> | 2014-02-28 00:30:35 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-02-28 00:30:35 -0500 |
commit | 049760cc7e3bf8685e0b13baa076ce0fb00ddd42 (patch) | |
tree | b10e16c34879a89bef732767aaebbdeccdde5508 | |
parent | e2ecec31b5b976fa37639de0f9aa00af747813fa (diff) |
Allow svsjoin/svspart on yourself
-rw-r--r-- | modules/commands/os_svs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/commands/os_svs.cpp b/modules/commands/os_svs.cpp index 39a99fc0a..35ad1aa1e 100644 --- a/modules/commands/os_svs.cpp +++ b/modules/commands/os_svs.cpp @@ -91,7 +91,7 @@ class CommandOSSVSJoin : public Command Channel *c = Channel::Find(params[1]); if (target == NULL) source.Reply(NICK_X_NOT_IN_USE, params[0].c_str()); - else if (target->IsProtected() || target->server == Me) + else if (source.GetUser() != target && (target->IsProtected() || target->server == Me)) source.Reply(ACCESS_DENIED); else if (!IRCD->IsChannelValid(params[1])) source.Reply(CHAN_X_INVALID, params[1].c_str()); @@ -135,7 +135,7 @@ class CommandOSSVSPart : public Command Channel *c = Channel::Find(params[1]); if (target == NULL) source.Reply(NICK_X_NOT_IN_USE, params[0].c_str()); - else if (target->IsProtected() || target->server == Me) + else if (source.GetUser() != target && (target->IsProtected() || target->server == Me)) source.Reply(ACCESS_DENIED); else if (!c) source.Reply(CHAN_X_NOT_IN_USE, params[1].c_str()); |