Make some ChanServ ban checks see through hidden hosts.
authorMichael Poole <mdpoole@troilus.org>
Tue, 2 May 2006 02:46:39 +0000 (02:46 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 2 May 2006 02:46:39 +0000 (02:46 +0000)
src/chanserv.c (handle_join): Make this function see through hidden
    hosts when matching users against bans.  Add comment before the
    non-burst section; remove a redundant burst check there.
  (handle_auth): See through hidden hosts when checking against active
    bans.  Inactive ban check keeps MATCH_VISIBLE since bans on the true
    hostname should have already been applied.
  (handle_nick_change): Same as handle_auth.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-14

ChangeLog
src/chanserv.c

index 0ad3c1fa87228c3e10f88501ee69bc2a2f0360d1..bfbbe2d31b5fc2b28b1247ca395317c07f33cb82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,25 @@
 # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
 #
 
+2006-05-02 02:46:39 GMT        Michael Poole <mdpoole@troilus.org>     patch-14
+
+    Summary:
+      Make some ChanServ ban checks see through hidden hosts.
+    Revision:
+      srvx--devo--1.3--patch-14
+
+    src/chanserv.c (handle_join): Make this function see through hidden
+        hosts when matching users against bans.  Add comment before the
+        non-burst section; remove a redundant burst check there.
+      (handle_auth): See through hidden hosts when checking against active
+        bans.  Inactive ban check keeps MATCH_VISIBLE since bans on the true
+        hostname should have already been applied.
+      (handle_nick_change): Same as handle_auth.
+
+    modified files:
+     ChangeLog src/chanserv.c
+
+
 2006-04-29 03:11:35 GMT        Michael Poole <mdpoole@troilus.org>     patch-13
 
     Summary:
index c0401d327b372f87031a7ed57e75cac026ef7308..99e9ba3deba3de044a232c65440b059b4cc1cf65 100644 (file)
@@ -5894,7 +5894,7 @@ handle_join(struct modeNode *mNode)
         unsigned int ii;
         for(ii = 0; ii < channel->banlist.used; ii++)
         {
-            if(user_matches_glob(user, channel->banlist.list[ii]->ban, MATCH_USENICK | MATCH_VISIBLE))
+            if(user_matches_glob(user, channel->banlist.list[ii]->ban, MATCH_USENICK))
             {
                 /* Riding a netburst.  Naughty. */
                 KickChannelUser(user, channel, chanserv, "User from far side of netsplit should have been banned - bye.");
@@ -5909,7 +5909,7 @@ handle_join(struct modeNode *mNode)
     {
         /* Not joining through a ban. */
         for(bData = cData->bans;
-            bData && !user_matches_glob(user, bData->mask, MATCH_USENICK | MATCH_VISIBLE);
+            bData && !user_matches_glob(user, bData->mask, MATCH_USENICK);
             bData = bData->next);
 
         if(bData)
@@ -6010,6 +6010,10 @@ handle_join(struct modeNode *mNode)
             uData->present = 1;
         }
     }
+
+    /* If user joining normally (not during burst), apply op or voice,
+     * and send greeting/userinfo as appropriate.
+     */
     if(!user->uplink->burst)
     {
         if(modes)
@@ -6020,7 +6024,7 @@ handle_join(struct modeNode *mNode)
             change.args[0].u.member = mNode;
             mod_chanmode_announce(chanserv, channel, &change);
         }
-        if(greeting && !user->uplink->burst)
+        if(greeting)
             send_message_type(4, user, chanserv, "(%s) %s", channel->name, greeting);
         if(uData && info)
             send_target_message(5, channel->name, chanserv, "[%s] %s", user->nick, uData->info);
@@ -6091,7 +6095,7 @@ handle_auth(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle))
            || IsSuspended(channel->channel_info))
             continue;
         for(jj = 0; jj < channel->banlist.used; ++jj)
-            if(user_matches_glob(user, channel->banlist.list[jj]->ban, MATCH_USENICK | MATCH_VISIBLE))
+            if(user_matches_glob(user, channel->banlist.list[jj]->ban, MATCH_USENICK))
                 break;
         if(jj < channel->banlist.used)
             continue;
@@ -6311,7 +6315,7 @@ handle_nick_change(struct userNode *user, UNUSED_ARG(const char *old_nick))
             continue;
         /* Look for a matching ban already on the channel. */
         for(jj = 0; jj < channel->banlist.used; ++jj)
-            if(user_matches_glob(user, channel->banlist.list[jj]->ban, MATCH_USENICK | MATCH_VISIBLE))
+            if(user_matches_glob(user, channel->banlist.list[jj]->ban, MATCH_USENICK))
                 break;
         /* Need not act if we found one. */
         if(jj < channel->banlist.used)