diff --git a/file/lib/system/command/CommandHandler.class.php b/file/lib/system/command/CommandHandler.class.php index 6961ff5..4a3cd8a 100644 --- a/file/lib/system/command/CommandHandler.class.php +++ b/file/lib/system/command/CommandHandler.class.php @@ -54,12 +54,14 @@ public function __construct($text, \chat\data\room\Room $room = null) { * @return array */ public static function getAliasMap() { + if (StringUtil::trim(CHAT_COMMAND_ALIASES) === '') return array(); + 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[StringUtil::trim($key)] = StringUtil::trim($val); } return $result;