list_add_tail(&ban->node, &banlist);
SSLi_hash2hex(ban->hash, hexhash);
- Log_info("User %s kickbanned. Reason: '%s' Hash: %s IP: %s Banned for: %d seconds",
- ban->name, ban->reason, hexhash, inet_ntoa(*((struct in_addr *)&ban->address)),
- getIntConf(BAN_LENGTH));
+ Log_info_client(client, "User kickbanned. Reason: '%s' Hash: %s IP: %s Banned for: %d seconds",
+ ban->name, ban->reason, hexhash, inet_ntoa(*((struct in_addr *)&ban->address)),
+ getIntConf(BAN_LENGTH));
}
if (strlen(getStrConf(ADMIN_PASSPHRASE)) > 0 &&
Client_token_match(client, getStrConf(ADMIN_PASSPHRASE))) {
client->isAdmin = true;
- Log_info("User is admin");
+ Log_info_client(client, "User provided admin password");
}
/* Setup UDP encryption */
if (msg->payload.userRemove->has_ban && msg->payload.userRemove->ban) {
Ban_UserBan(target, msg->payload.userRemove->reason);
} else {
- Log_info("User kicked");
+ Log_info_client(target, "User kicked. Reason: '%s'",
+ strlen(msg->payload.userRemove->reason) == 0 ? "N/A" : msg->payload.userRemove->reason);
}
/* Re-use message */
Msg_inc_ref(msg);