Bugfixes for !trim users, !unsuspend and /clearmodes
authorMichael Poole <mdpoole@troilus.org>
Mon, 19 Jul 2004 03:38:09 +0000 (03:38 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 19 Jul 2004 03:38:09 +0000 (03:38 +0000)
* Show actual upper bound used to trim users.

* Update whether an user being unsuspended is in the channel.

* Add a missing "break;" so that /clearmodes c doesn't clear NOCTCPS too.
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-73

ChangeLog
src/chanserv.c
src/proto-p10.c

index 802b87e255ce2f0812c03094215860e5dce80e03..e1650de9aae18374871858e693f67e2e1566fad2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,23 @@
 # arch-tag: automatic-ChangeLog--srvx@srvx.net--2004-srvx/srvx--devo--1.3
 #
 
+2004-07-19 03:38:09 GMT        Michael Poole <mdpoole@troilus.org>     patch-73
+
+    Summary:
+      Bugfixes for !trim users, !unsuspend and /clearmodes
+    Revision:
+      srvx--devo--1.3--patch-73
+
+    * Show actual upper bound used to trim users.
+    
+    * Update whether an user being unsuspended is in the channel.
+    
+    * Add a missing "break;" so that /clearmodes c doesn't clear NOCTCPS too.
+
+    modified files:
+     ChangeLog src/chanserv.c src/proto-p10.c
+
+
 2004-07-12 19:06:38 GMT        Michael Poole <mdpoole@troilus.org>     patch-72
 
     Summary:
index 8299d0fcbd7101975caed71d88c8d16f89b41d84..2979451e9d59561251977e1ac7976b29670cc7e9 100644 (file)
@@ -2448,7 +2448,7 @@ cmd_trim_users(struct userNode *user, struct chanNode *channel, unsigned short m
     if(!max_access)
     {
         min_access = 1;
-        max_access = UL_OWNER;
+        max_access = (uData->access >= UL_OWNER) ? UL_OWNER : (uData->access - 1);
     }
     send_message(user, chanserv, "CSMSG_TRIMMED_USERS", count, min_access, max_access, channel->name, intervalString(interval, duration, user->handle_info));
     return 1;
@@ -5544,6 +5544,7 @@ static CHANSERV_FUNC(cmd_unsuspend)
         return 0;
     }
     target->flags &= ~USER_SUSPENDED;
+    scan_user_presence(target, NULL);
     reply("CSMSG_USER_UNSUSPENDED", hi->handle, channel->name);
     return 1;
 }
index 2471cb487fffb5220be8c5fba0537e545a2aabe3..937398595277874f71de34931e6e2ab8de40720a 100644 (file)
@@ -2373,7 +2373,7 @@ clear_chanmode(struct chanNode *channel, const char *modes)
         case 'b': remove |= MODE_BAN; break;
         case 'D': remove |= MODE_DELAYJOINS; break;
         case 'r': remove |= MODE_REGONLY; break;
-        case 'c': remove |= MODE_NOCOLORS;
+        case 'c': remove |= MODE_NOCOLORS; break;
         case 'C': remove |= MODE_NOCTCPS; break;
         }
     }