This patch forbids banned users from setting the topic in a -t+n channel.

Originally made by OUTsider but his patch was bugged. This patch closes patch 
#757583.

~reed
Index: ChangeLog
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ChangeLog,v
retrieving revision 1.290.2.129.2.13
diff -b -u -d -r1.290.2.129.2.13 ChangeLog
--- ChangeLog	7 Nov 2003 00:37:31 -0000	1.290.2.129.2.13
+++ ChangeLog	7 Nov 2003 04:13:53 -0000
@@ -1,3 +1,9 @@
+2003-11-06  Alexander Maassen  <[EMAIL PROTECTED]>
+	    Reed Loden  <[EMAIL PROTECTED]>
+
+	* ircd/m_topic.c: Don't allow banned users to set a topic in a
+	channel.
+
 2003-11-06 Isomer <[EMAIL PROTECTED]>
 	* include/gline.c: a^b vs !(a^b)
 
Index: ircd/m_topic.c
===================================================================
RCS file: /cvsroot/undernet-ircu/ircu2.10/ircd/m_topic.c,v
retrieving revision 1.9.2.2
diff -b -u -d -r1.9.2.2 m_topic.c
--- ircd/m_topic.c	15 Dec 2002 01:02:42 -0000	1.9.2.2
+++ ircd/m_topic.c	7 Nov 2003 04:13:53 -0000
@@ -104,6 +104,13 @@
       send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
       return;
    }
+   /* if +m-t and not service/+v/+o, return error and ignore */
+   if (!client_can_send_to_channel(sptr, chptr)
+       && !IsChannelService(sptr) && !IsVoicedOrOpped(chptr->members))
+   {
+      send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
+      return;
+   }
    /* Note if this is just a refresh of an old topic, and don't
     * send it to all the clients to save bandwidth.  We still send
     * it to other servers as they may have split and lost the topic.

Reply via email to