[Commands] Fix typos in #ban and #ipban Commands. (#2209)

This commit is contained in:
Kinglykrab 2022-05-25 20:05:07 -04:00 committed by GitHub
parent e2708af6f2
commit 6636c64c82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -28,9 +28,9 @@ void command_ban(Client *c, const Seperator *sep)
c->Message( c->Message(
Chat::White, Chat::White,
fmt::format( fmt::format(
"Character {} does not exist." "Character {} does not exist.",
).c_str(), character_name
character_name ).c_str()
); );
return; return;
} }
@ -53,20 +53,19 @@ void command_ban(Client *c, const Seperator *sep)
); );
ServerPacket flagUpdatePack(ServerOP_FlagUpdate, sizeof(ServerFlagUpdate_Struct)); ServerPacket flagUpdatePack(ServerOP_FlagUpdate, sizeof(ServerFlagUpdate_Struct));
ServerFlagUpdate_Struct *sfus = (ServerFlagUpdate_Struct *) flagUpdatePack.pBuffer; auto sfus = (ServerFlagUpdate_Struct *) flagUpdatePack.pBuffer;
sfus->account_id = account_id; sfus->account_id = account_id;
sfus->admin = -2; sfus->admin = -2;
worldserver.SendPacket(&flagUpdatePack); worldserver.SendPacket(&flagUpdatePack);
Client *client = nullptr; auto client = entity_list.GetClientByName(character_name.c_str());
client = entity_list.GetClientByName(character_name.c_str());
if (client) { if (client) {
client->WorldKick(); client->WorldKick();
return; return;
} }
ServerPacket kickPlayerPack(ServerOP_KickPlayer, sizeof(ServerKickPlayer_Struct)); ServerPacket kickPlayerPack(ServerOP_KickPlayer, sizeof(ServerKickPlayer_Struct));
ServerKickPlayer_Struct *skp = (ServerKickPlayer_Struct *) kickPlayerPack.pBuffer; auto skp = (ServerKickPlayer_Struct *) kickPlayerPack.pBuffer;
strcpy(skp->adminname, c->GetName()); strcpy(skp->adminname, c->GetName());
strcpy(skp->name, character_name.c_str()); strcpy(skp->name, character_name.c_str());
skp->adminrank = c->Admin(); skp->adminrank = c->Admin();

View File

@ -25,8 +25,10 @@ void command_ipban(Client *c, const Seperator *sep)
} else { } else {
c->Message( c->Message(
Chat::White, Chat::White,
"IP '{}' has failed to be banned, the IP address may already be in the table.", fmt::format(
ip "IP '{}' has failed to be banned, the IP address may already be in the table.",
ip
).c_str()
); );
} }
} }