]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - Classes/class-cmodes.php
Fix linkage in server-bans/spamfilter.php lol
[irc/unrealircd/unrealircd-webpanel.git] / Classes / class-cmodes.php
index 93b7924f5c244cc2b2a03d2cdd2209abab76b637..f49f0cbaa473a585c46721fd96390e0e9ea287d9 100644 (file)
@@ -4,7 +4,14 @@
  * A set of reference lists
  */
 class IRCList {
-
+    public static $grouping = 
+    [
+        "Join restrictions"=>"kliRzOL",
+        "Message restrictions"=>"cSmMnGT",
+        "Anti-flood and other restrictions"=>"FftCNKVQ",
+        "Visibility"=>"sp",
+        "Other"=>"rPHzZDd",
+    ];
     public static $cmodes =
     [
         "a" =>  [
@@ -18,14 +25,14 @@ class IRCList {
             "requires" => "HalfOp"
         ],
         "c" => [
-            "name" => "No CTCPs",
-            "description" => "Prevents users from sending CTCP's to the channel",
-            "requires" => "HalfOp"
+            "name" => "No colors",
+            "description" => "Block messages containing mIRC color codes",
+            "requires" => "Operator"
         ],
         "d" => [
             "name" => "Delay Join",
-            "description" => "Delay showing joins until someone actually speaks.",
-            "requires" => "Operator"
+            "description" => "Indicates there are invisible users left over due to unsetting 'D'",
+            "requires" => "Server"
         ],
         "e" => [
             "name" => "Ban Exemption",
@@ -39,7 +46,7 @@ class IRCList {
         ],
         "h" => [
             "name" => "Half Op",
-            "description" => "Marks someone as channel admin (%)",
+            "description" => "Marks someone as channel halfop (%)",
             "requires" => "Operator"
         ],
         "i" => [
@@ -85,7 +92,7 @@ class IRCList {
         "r" => [
             "name" => "Registered",
             "description" => "Channel has been registered to an account",
-            "requires" => "Services"
+            "requires" => "Server"
         ],
         "s" => [
             "name" => "Secret",
@@ -119,7 +126,8 @@ class IRCList {
         ],
         "F" => [
             "name" => "Flood Profile",
-            "description" => "Use a Flood Profile to easily apply flood protection mechanisms",
+            "description" => "Uses a Flood Profile to easily apply flood protection mechanisms",
+            "requires" => "Operator"
         ],
         "G" => [
             "name" => "Filter",
@@ -197,6 +205,16 @@ class IRCList {
             "requires" => "Server"
         ]
     ];
+
+    static function lookup($mode)
+    {
+        return (isset(self::$cmodes[$mode])) ? self::$cmodes[$mode] :
+        [
+            'name' => "Unknown mode",
+            'description' => "Unknown mode +$mode",
+            'requires' => 'Unknown'
+        ];
+    }
     static function setmodes($modes)
     {
         $g = [];
@@ -212,4 +230,4 @@ class IRCList {
     }
     static $uplink = [];
     
-}
\ No newline at end of file
+}