mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-22 07:01:29 +00:00
Fix for #bot command crashing the zone when sent with no text following "#bot"
This commit is contained in:
parent
30b516e7bd
commit
7b04b9ef4a
@ -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)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user