summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-24 18:00:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-24 18:00:28 +0000
commitafcdca067056e4740fb5f36e2dcf1f54616ea506 (patch)
tree97258e2ae6f6552e7d8a0f3903e19a963a1b917e
parent7b0fcbfc069b201a8c295c956bcf2287abd26894 (diff)
Dont allow /REMOVE of a uline, dont allow /REMOVE of a user who isnt on the channel (*slaps* Om)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4057 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_remove.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 7662ef5d4..aa8246464 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -76,6 +76,12 @@ class cmd_remove : public command_t
return;
}
+ if (!channel->HasUser(target))
+ {
+ Srv->SendTo(NULL,user,"NOTICE "+std::string(user->nick)+" :*** The user "+target->nick+" is not on channel "+channel->name);
+ return;
+ }
+
/* And see if the person calling the command has access to use it on the channel */
uprivs = Srv->ChanMode(user, channel);
@@ -115,7 +121,7 @@ class cmd_remove : public command_t
if (ulevel > 1)
{
/* For now, we'll let everyone remove their level and below, eg ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) */
- if(ulevel >= tlevel && tlevel != 5)
+ if ((ulevel >= tlevel && tlevel != 5) && (!Srv->IsUlined(target->server)))
{
Srv->PartUserFromChannel(target, channel->name, reason);
WriteServ(user->fd, "NOTICE %s :%s removed %s from the channel", channel->name, user->nick, target->nick);