mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-29 03:13:53 +00:00
[Bug Fix] Add check for underscores in botcreate command (#3458)
* Update bot_command.cpp with botcreate check Check for underscores in bot names as the server will replace with a space and add to the database. The bot can't be deleted/summoned or changed except by editing the database * Update bot_command.cpp * Update bot_command.cpp --------- Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
parent
a1f154749c
commit
927d379e75
@ -5512,6 +5512,12 @@ void bot_subcommand_bot_create(Client *c, const Seperator *sep)
|
||||
|
||||
std::string bot_name = sep->arg[1];
|
||||
bot_name = Strings::UcFirst(bot_name);
|
||||
|
||||
if (Strings::Contains(bot_name, "_")) {
|
||||
c->Message(Chat::White, "Bot name cannot contain underscores!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (arguments < 2 || !sep->IsNumber(2)) {
|
||||
c->Message(Chat::White, "Invalid class!");
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user