]> jfr.im git - irc/atheme/atheme.git/commitdiff
nickserv/enforce: do not allow REGAIN if the source or target user are banned on...
authorWilliam Pitcock <redacted>
Sat, 9 Aug 2014 00:56:42 +0000 (19:56 -0500)
committerWilliam Pitcock <redacted>
Sat, 9 Aug 2014 00:56:42 +0000 (19:56 -0500)
modules/nickserv/enforce.c

index 23c1878f2964d7c8f9abc138fab78f7a101aab74..81e5170afa4104cbd7fb3a945033aa0ee4bb0148 100644 (file)
@@ -309,6 +309,13 @@ static void ns_cmd_regain(sourceinfo_t *si, int parc, char *parv[])
        }
        if ((si->smu == mn->owner) || verify_password(mn->owner, password))
        {
+               if (user_is_channel_banned(si->su, 'b') || user_is_channel_banned(si->su, 'q') ||
+                   user_is_channel_banned(u, 'b') || user_is_channel_banned(u, 'q'))
+               {
+                       command_fail(si, fault_noprivs, _("You can not regain your nickname while banned or quieted on a channel."));
+                       return;
+               }
+
                /* if this (nick, host) is waiting to be enforced, remove it */
                if (si->su != NULL)
                {