Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

m_remove: forbid removing ulined users

  • Loading branch information...
commit 48af4b1f13b89e0a0952aef5139b51102a0fcb05 1 parent 58f0b9d
@Justasic Justasic authored Daniel De Graaf committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/modules/m_remove.cpp
View
5 src/modules/m_remove.cpp
@@ -78,6 +78,11 @@ class RemoveBase : public Command
hasnokicks = (ServerInstance->Modules->Find("m_nokicks.so") && channel->IsModeSet('Q'));
+ if((ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick.c_str()))){
+ user->WriteNumeric(482, "%s %s :Only a u-line may remove a u-line from a channel.", user->nick.c_str(), channame);
+ return CMD_FAILURE;
+ }
+
/* We support the +Q channel mode via. the m_nokicks module, if the module is loaded and the mode is set then disallow the /remove */
if ((!IS_LOCAL(user)) || (!supportnokicks || !hasnokicks))
{
Please sign in to comment.
Something went wrong with that request. Please try again.