Răsfoiți Sursa

Add 'react' to handle non-user flag change reactions

Bryan Drewery 14 ani în urmă
părinte
comite
d3d8251957
3 a modificat fișierele cu 11 adăugiri și 8 ștergeri
  1. 9 7
      doc/help.txt
  2. 1 0
      src/chan.h
  3. 1 1
      src/mod/channels.mod/cmdschan.c

+ 9 - 7
doc/help.txt

@@ -429,15 +429,17 @@ See also: link%{+a}, newhub%{-}
    The following options choose how to respond to specific events.
         Each can be set as any of the specified options.
         ignore/0           Ignore
-        deop/1             Deop user (chattr +d)
-        kick/2             Kick user (chattr +k)
+        deop/1             Chattr user +d (deop)
+        kick/2             Chattr user +k (auto kickban)
         delete/remove/3    Remove user
-      
+        react/4            React and punish the client, but don't add or modify
+                             their user flags.
+   These events trigger the bot to react with the above option.
       $bbad-cookie$b             Missing or invalid cookie in bot op line.
-      $bmanop$b                  Users who op manually.
-      $bmdop$b                   Users who mass deop.
-      $bmop$b                    Users who mass op in a -mop chan.
-      $brevenge$b                Users who kick/ban/deop bots.
+      $bmanop$b                  Manual op.
+      $bmdop$b                   Mass deop.
+      $bmop$b                    Mass op.
+      $brevenge$b                Client kicking/banning/deopping another bot.
  
    The following can be set + or - (e.g. '%dchanset #channel -enforcebans')
         $bautoop$b         Bots that are +y will auto-op all users with 

+ 1 - 0
src/chan.h

@@ -66,6 +66,7 @@ enum deflag_t {
   DEFLAG_DEOP = 1,
   DEFLAG_KICK = 2,
   DEFLAG_DELETE = 3,
+  DEFLAG_REACT = 4,
 };
 
 /* Why duplicate this struct for exempts and invites only under another

+ 1 - 1
src/mod/channels.mod/cmdschan.c

@@ -1135,7 +1135,7 @@ static void show_int(int idx, char *work, int *cnt, const char *desc, int state,
 
 #define SHOW_FLAG(name, state) show_flag(idx, work, &cnt, name, state, sizeof(work))
 #define SHOW_INT(desc, state, yes, no) show_int(idx, work, &cnt, desc, state, yes, no, sizeof(work))
-#define DEFLAG_STR deflag == DEFLAG_KICK ? "Kick" : (deflag == DEFLAG_DEOP ? "Deop" : (deflag == DEFLAG_DELETE ? "Remove" : NULL))
+#define DEFLAG_STR deflag == DEFLAG_KICK ? "Kick" : (deflag == DEFLAG_DEOP ? "Deop" : (deflag == DEFLAG_DELETE ? "Remove" : (deflag == DEFLAG_REACT ? "React" : NULL)))
 #define F_STR(x) x == CHAN_FLAG_OP ? "Op" : (x == CHAN_FLAG_VOICE ? "Voice" : (x == CHAN_FLAG_USER ? "User" : NULL))
 static void cmd_chaninfo(int idx, char *par)
 {