Author: Michael Poole <mdpoole@troilus.org>
authorMichael Poole <mdpoole@troilus.org>
Tue, 13 Jan 2009 03:54:45 +0000 (03:54 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 13 Jan 2009 03:54:45 +0000 (03:54 +0000)
Description:

Fix the issues described by weibe in SourceForge.net bug 2045310
(TOPIC, WALLCHOPS and WALLVOICES do not reveal join-delayed users).

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1903 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_topic.c
ircd/m_wallchops.c
ircd/m_wallvoices.c

index b9b169e76d3f4fdf43c4995edd7f2a4d0fd67757..99314784a120a405d43ad397368e94efc85fc3a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-01-12  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_topic.c (do_settopic): Just before sending the topic out,
+       check to see if the user is join-delayed and should be shown.
+
+       * ircd/m_wallchops.c (m_wallchops): Allow this command to expose
+       join-delayed users.
+       (ms_wallchops): Likewise.
+
+       * ircd/m_wallvoices.c (m_wallvoices): Allow this command to expose
+       join-delayed users.
+       (ms_wallvoices): Likewise.
+
 2009-01-12  Michael Poole <mdpoole@troilus.org>
 
        * ircd/channel.c (modebuf_mode_uint): Fix bouncing of limit changes.
 2009-01-12  Michael Poole <mdpoole@troilus.org>
 
        * ircd/channel.c (modebuf_mode_uint): Fix bouncing of limit changes.
index 9ef803ebaf3954199cee20c10ea88c2553e8fa61..8eebf458c1407eec5ed3b9ff8cf8c044b20955cd 100644 (file)
@@ -72,8 +72,17 @@ static void do_settopic(struct Client *sptr, struct Client *cptr,
      sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu %Tu :%s", chptr,
                           chptr->creationtime, chptr->topic_time, chptr->topic);
    if (newtopic)
      sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu %Tu :%s", chptr,
                           chptr->creationtime, chptr->topic_time, chptr->topic);
    if (newtopic)
+   {
+     struct Membership *member;
+
+     /* If the member is delayed-join, show them. */
+     member = find_channel_member(sptr, chptr);
+     if (member && IsDelayedJoin(member))
+       RevealDelayedJoin(member);
+
      sendcmdto_channel_butserv_butone(from, CMD_TOPIC, chptr, NULL, 0,
                                       "%H :%s", chptr, chptr->topic);
      sendcmdto_channel_butserv_butone(from, CMD_TOPIC, chptr, NULL, 0,
                                       "%H :%s", chptr, chptr->topic);
+   }
       /* if this is the same topic as before we send it to the person that
        * set it (so they knew it went through ok), but don't bother sending
        * it to everyone else on the channel to save bandwidth
       /* if this is the same topic as before we send it to the person that
        * set it (so they knew it went through ok), but don't bother sending
        * it to everyone else on the channel to save bandwidth
index a3a91339eaddc343b5044c04a09c3ac23fb71d6e..5b609590cb48c9651efa612d38c54b5e6e5a2bcf 100644 (file)
@@ -115,7 +115,7 @@ int m_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[]
     return send_reply(sptr, ERR_NOTEXTTOSEND);
 
   if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
     return send_reply(sptr, ERR_NOTEXTTOSEND);
 
   if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
-    if (client_can_send_to_channel(sptr, chptr, 0)) {
+    if (client_can_send_to_channel(sptr, chptr, 1)) {
       if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
           check_target_limit(sptr, chptr, chptr->chname, 0))
         return 0;
       if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
           check_target_limit(sptr, chptr, chptr->chname, 0))
         return 0;
@@ -145,7 +145,7 @@ int ms_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[
     return 0;
 
   if (!IsLocalChannel(parv[1]) && (chptr = FindChannel(parv[1]))) {
     return 0;
 
   if (!IsLocalChannel(parv[1]) && (chptr = FindChannel(parv[1]))) {
-    if (client_can_send_to_channel(sptr, chptr, 0)) {
+    if (client_can_send_to_channel(sptr, chptr, 1)) {
       sendcmdto_channel_butone(sptr, CMD_WALLCHOPS, chptr, cptr,
                               SKIP_DEAF | SKIP_BURST | SKIP_NONOPS,
                               "%H :%s", chptr, parv[parc - 1]);
       sendcmdto_channel_butone(sptr, CMD_WALLCHOPS, chptr, cptr,
                               SKIP_DEAF | SKIP_BURST | SKIP_NONOPS,
                               "%H :%s", chptr, parv[parc - 1]);
index 2fdc5f3fdef3b353dcc311259e7d38ea1a5e0c88..c5d0461dab54fc7b1ba0e9a733d92543de83b8cb 100644 (file)
@@ -114,7 +114,7 @@ int m_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char* parv[
     return send_reply(sptr, ERR_NOTEXTTOSEND);
 
   if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
     return send_reply(sptr, ERR_NOTEXTTOSEND);
 
   if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
-    if (client_can_send_to_channel(sptr, chptr, 0)) {
+    if (client_can_send_to_channel(sptr, chptr, 1)) {
       if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
           check_target_limit(sptr, chptr, chptr->chname, 0))
         return 0;
       if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
           check_target_limit(sptr, chptr, chptr->chname, 0))
         return 0;
@@ -144,7 +144,7 @@ int ms_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char* parv
     return 0;
 
   if (!IsLocalChannel(parv[1]) && (chptr = FindChannel(parv[1]))) {
     return 0;
 
   if (!IsLocalChannel(parv[1]) && (chptr = FindChannel(parv[1]))) {
-    if (client_can_send_to_channel(sptr, chptr, 0)) {
+    if (client_can_send_to_channel(sptr, chptr, 1)) {
       sendcmdto_channel_butone(sptr, CMD_WALLVOICES, chptr, cptr,
                               SKIP_DEAF | SKIP_BURST | SKIP_NONVOICES, 
                               "%H :%s", chptr, parv[parc - 1]);
       sendcmdto_channel_butone(sptr, CMD_WALLVOICES, chptr, cptr,
                               SKIP_DEAF | SKIP_BURST | SKIP_NONVOICES, 
                               "%H :%s", chptr, parv[parc - 1]);