From 049760cc7e3bf8685e0b13baa076ce0fb00ddd42 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 28 Feb 2014 00:30:35 -0500 Subject: Allow svsjoin/svspart on yourself --- modules/commands/os_svs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') 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()); -- cgit