Log kick events

This commit is contained in:
KimLS
2019-07-26 19:22:29 -07:00
parent a8ec176432
commit 9297fc38f6
13 changed files with 36 additions and 23 deletions
+8 -2
View File
@@ -845,7 +845,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
{
if(AttemptedMessages > RuleI(Chat, MaxMessagesBeforeKick))
{
Kick();
Kick("Sent too many chat messages at once.");
return;
}
if(GlobalChatLimiterTimer)
@@ -2586,13 +2586,19 @@ void Client::SetPVP(bool toggle, bool message) {
Save();
}
void Client::Kick(const std::string &reason) {
client_state = CLIENT_KICKED;
database.CreateKickEvent(GetName(), reason);
}
void Client::WorldKick() {
auto outapp = new EQApplicationPacket(OP_GMKick, sizeof(GMKick_Struct));
GMKick_Struct* gmk = (GMKick_Struct *)outapp->pBuffer;
strcpy(gmk->name,GetName());
QueuePacket(outapp);
safe_delete(outapp);
Kick();
Kick("World kick issued");
}
void Client::GMKill() {