Added #command error message suppression for those who don't want to see 'Command is not recognized' constantly

- You need to have rule 'Chat:SuppressCommandErrors' set to true, this is set to false by default
	- Required SQL: 2014_04_18_Suppress_Command_Error.sql
This commit is contained in:
Akkadius
2014-04-18 19:37:26 -05:00
parent fc9e7a3a3b
commit 0b2281967b
4 changed files with 10 additions and 2 deletions
+3 -2
View File
@@ -1022,11 +1022,12 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
if(command_dispatch(this, message) == -2) {
if(parse->PlayerHasQuestSub(EVENT_COMMAND)) {
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
if(i == 0) {
if(i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
Message(13, "Command '%s' not recognized.", message);
}
} else {
Message(13, "Command '%s' not recognized.", message);
if(!RuleB(Chat, SuppressCommandErrors))
Message(13, "Command '%s' not recognized.", message);
}
}
break;