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