Do not allowed banned users to change a (-t) channel's topic.
authorMichael Poole <mdpoole@troilus.org>
Sat, 11 Sep 2004 23:43:00 +0000 (23:43 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 11 Sep 2004 23:43:00 +0000 (23:43 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1133 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_topic.c

index f19c6d9fe80acb46e868f1c9c2e28bca2ac7c8ac..a50aa94ba8047ae3a9938ca42f73bd7f3520f842 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-20  Alexander Maassen <outsider@key2peace.org>
+
+       * ircd/m_topic.c : Don't allow banned users to set a topic in a
+       channel.
+
 2004-09-11  Kevin L Mitchell  <klmitch@mit.edu>
 
        * config.h.in, tools/Makefile.crypt: Remove wrong pathname from
index 072e2a79ea6feccc36d5e7d5c2bfd8198dcf2ab9..2a4c55985f94150bba25e6059ae8479a7168b6ff 100644 (file)
@@ -108,14 +108,16 @@ static void do_settopic(struct Client *sptr, struct Client *cptr,
    else
        from = sptr;
    member = find_channel_member(sptr, chptr);
-   /* if +n and not @'d, return an error and ignore the topic */
+   /* if +t and not @'d, return an error and ignore the topic */
    if ((chptr->mode.mode & MODE_TOPICLIMIT) != 0 && (!member || !IsChanOp(member)))
    {
       send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
       return;
    }
-   if (member && IsDelayedJoin(member))
-     RevealDelayedJoin(member);
+   if (!client_can_send_to_channel(sptr, chptr, 1) && !IsChannelService(sptr)) {
+      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.