mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
parent
1060ad1512
commit
30b29ae654
@ -54,6 +54,7 @@ public function __construct($text, \chat\data\room\Room $room = null) {
|
||||
* @return array<string>
|
||||
*/
|
||||
public static function getAliasMap() {
|
||||
try {
|
||||
$result = array();
|
||||
foreach (explode("\n", StringUtil::unifyNewlines(StringUtil::toLowerCase(CHAT_COMMAND_ALIASES))) as $line) {
|
||||
list($key, $val) = explode(':', $line, 2);
|
||||
@ -63,6 +64,10 @@ public static function getAliasMap() {
|
||||
|
||||
return $result;
|
||||
}
|
||||
catch (\wcf\system\exception\SystemException $e) {
|
||||
throw new \wcf\system\exception\SystemException("Invalid alias specified: '".$line."'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given text is a command.
|
||||
|
Loading…
Reference in New Issue
Block a user