X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/fb27b14ad038e18ed27c36dce105a00e75c21167..cd26522ba6ff68c18e1504b022ca92f4d01827be:/Classes/class-cmodes.php
diff --git a/Classes/class-cmodes.php b/Classes/class-cmodes.php
index 1105e88..f49f0cb 100644
--- a/Classes/class-cmodes.php
+++ b/Classes/class-cmodes.php
@@ -4,7 +4,15 @@
* A set of reference lists
*/
class IRCList {
- static $cmodes =
+ public static $grouping =
+ [
+ "Join restrictions"=>"kliRzOL",
+ "Message restrictions"=>"cSmMnGT",
+ "Anti-flood and other restrictions"=>"FftCNKVQ",
+ "Visibility"=>"sp",
+ "Other"=>"rPHzZDd",
+ ];
+ public static $cmodes =
[
"a" => [
"name" => "Admin",
@@ -17,9 +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" => "Indicates there are invisible users left over due to unsetting 'D'",
+ "requires" => "Server"
],
"e" => [
"name" => "Ban Exemption",
@@ -33,12 +46,12 @@ class IRCList {
],
"h" => [
"name" => "Half Op",
- "description" => "Marks someone as channel admin (%)",
+ "description" => "Marks someone as channel halfop (%)",
"requires" => "Operator"
],
"i" => [
"name" => "Invite Only",
- "description" => "requires an invitation to join",
+ "description" => "Requires an invitation to join",
"requires" => "HalfOp"
],
"k" => [
@@ -68,7 +81,7 @@ class IRCList {
],
"p" => [
"name" => "Private",
- "description" => "Prevents the channel from showing up in /WHOIS outputs and is replaces with \"*\" in /LIST outputs",
+ "description" => "Prevents the channel from showing up in /WHOIS
outputs and is replaces with \"*\" in /LIST
outputs",
"requires" => "Operator"
],
"q" => [
@@ -79,7 +92,7 @@ class IRCList {
"r" => [
"name" => "Registered",
"description" => "Channel has been registered to an account",
- "requires" => "Services"
+ "requires" => "Server"
],
"s" => [
"name" => "Secret",
@@ -111,6 +124,11 @@ class IRCList {
"description" => "Delay showing joins until someone actually speaks.",
"requires" => "Operator"
],
+ "F" => [
+ "name" => "Flood Profile",
+ "description" => "Uses a Flood Profile to easily apply flood protection mechanisms",
+ "requires" => "Operator"
+ ],
"G" => [
"name" => "Filter",
"description" => "Filters out all Bad words in messages with \"<censored>\".",
@@ -124,7 +142,7 @@ class IRCList {
"I" => [
"name" => "Invitation",
"description" => "Marks an inviation to a channel.",
- "requires" => "HalOp"
+ "requires" => "HalfOp"
],
"K" => [
"name" => "No Knock",
@@ -187,4 +205,29 @@ class IRCList {
"requires" => "Server"
]
];
-}
\ No newline at end of file
+
+ 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 = [];
+ if (is_array($modes))
+ {
+ self::$uplink = $modes;
+ return;
+ }
+ else if (!strstr($modes,","))
+ $g = [$modes];
+ else $g = split($g,",");
+ self::$uplink = $g;
+ }
+ static $uplink = [];
+
+}