diff --git a/zone/client.cpp b/zone/client.cpp index d258ae7bf..9ea27869a 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -1106,14 +1106,22 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s case ChatChannel_Say: { /* Say */ if(message[0] == COMMAND_CHAR) { if(command_dispatch(this, message) == -2) { - if(parse->PlayerHasQuestSub(EVENT_COMMAND)) { + if (parse->PlayerHasQuestSub(EVENT_COMMAND)) { int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0); - if(i == 0 && !RuleB(Chat, SuppressCommandErrors)) { + if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) { Message(Chat::Red, "Command '%s' not recognized.", message); } - } else { - if(!RuleB(Chat, SuppressCommandErrors)) + } + else if (parse->PlayerHasQuestSub(EVENT_SAY)) { + int i = parse->EventPlayer(EVENT_SAY, this, message, 0); + if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) { Message(Chat::Red, "Command '%s' not recognized.", message); + } + } + else { + if (!RuleB(Chat, SuppressCommandErrors)) { + Message(Chat::Red, "Command '%s' not recognized.", message); + } } } break; @@ -1128,9 +1136,16 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s Message(Chat::Red, "Bot command '%s' not recognized.", message); } } - else { - if (!RuleB(Chat, SuppressCommandErrors)) + else if (parse->PlayerHasQuestSub(EVENT_SAY)) { + int i = parse->EventPlayer(EVENT_SAY, this, message, 0); + if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) { Message(Chat::Red, "Bot command '%s' not recognized.", message); + } + } + else { + if (!RuleB(Chat, SuppressCommandErrors)) { + Message(Chat::Red, "Bot command '%s' not recognized.", message); + } } } break; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 8d583985d..6a8ef9dd3 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -8297,7 +8297,9 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app) parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0); } #endif - parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0); + else { + parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0); + } } else { Message(Chat::LightGray, "You say, '%s'", response.c_str()); @@ -8315,7 +8317,9 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app) parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0); } #endif - parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0); + else { + parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0); + } } else { Message(Chat::LightGray, "You say, '%s'", response.c_str());