* 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",
"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",
],
"h" => [
"name" => "Half Op",
- "description" => "Marks someone as channel admin (%)",
+ "description" => "Marks someone as channel halfop (%)",
"requires" => "Operator"
],
"i" => [
"r" => [
"name" => "Registered",
"description" => "Channel has been registered to an account",
- "requires" => "Services"
+ "requires" => "Server"
],
"s" => [
"name" => "Secret",
],
"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",
"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 = [];
+
+}