mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Fix for #bot command crashing the zone when sent with no text following "#bot"
This commit is contained in:
+7
-2
@@ -10848,8 +10848,13 @@ void command_reloadperlexportsettings(Client *c, const Seperator *sep)
|
|||||||
void command_bot(Client *c, const Seperator *sep)
|
void command_bot(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
std::string bot_message = sep->msg;
|
std::string bot_message = sep->msg;
|
||||||
bot_message = bot_message.substr(bot_message.find_first_not_of("#bot"));
|
if (bot_message.compare("#bot") == 0) {
|
||||||
bot_message[0] = BOT_COMMAND_CHAR;
|
bot_message[0] = BOT_COMMAND_CHAR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bot_message = bot_message.substr(bot_message.find_first_not_of("#bot"));
|
||||||
|
bot_message[0] = BOT_COMMAND_CHAR;
|
||||||
|
}
|
||||||
|
|
||||||
if (bot_command_dispatch(c, bot_message.c_str()) == -2) {
|
if (bot_command_dispatch(c, bot_message.c_str()) == -2) {
|
||||||
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user