[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(
Chat::White,
fmt::format(
"Character {} does not exist."
).c_str(),
character_name
"Character {} does not exist.",
character_name
).c_str()
);
return;
}
@ -53,20 +53,19 @@ void command_ban(Client *c, const Seperator *sep)
);
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->admin = -2;
worldserver.SendPacket(&flagUpdatePack);
Client *client = nullptr;
client = entity_list.GetClientByName(character_name.c_str());
auto client = entity_list.GetClientByName(character_name.c_str());
if (client) {
client->WorldKick();
return;
}
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->name, character_name.c_str());
skp->adminrank = c->Admin();

View File

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