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

View File

@ -1,5 +1,10 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 04/18/2014 ==
Akkadius: 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
== 04/15/2014 ==
Akkadius: Exported $client->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, msg) - Will be available for simple plugin use
Akkadius: Exported $client->ExpeditionMessage(THIS, ExpdID, Message) - In use with custom expedition mod that will be released soon

View File

@ -464,6 +464,7 @@ RULE_BOOL ( Chat, ServerWideAuction, true)
RULE_BOOL ( Chat, EnableVoiceMacros, true)
RULE_BOOL ( Chat, EnableMailKeyIPVerification, true)
RULE_BOOL ( Chat, EnableAntiSpam, true)
RULE_BOOL ( Chat, SuppressCommandErrors, false) // Do not suppress by default
RULE_INT ( Chat, MinStatusToBypassAntiSpam, 100)
RULE_INT ( Chat, MinimumMessagesPerInterval, 4)
RULE_INT ( Chat, MaximumMessagesPerInterval, 12)

View File

@ -0,0 +1 @@
INSERT INTO `rule_values` VALUES ('0', 'Chat:SuppressCommandErrors', 'true', 'This will suppress "Command is not recognized"');

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;