projects
/
umurmur.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed debug logging
[umurmur.git]
/
src
/
ban.c
diff --git
a/src/ban.c
b/src/ban.c
index c8b868809f0090a78465785ad6cdf2e097f523bc..c7ed670631273e616d8a2555b4050489a892256a 100644
(file)
--- a/
src/ban.c
+++ b/
src/ban.c
@@
-90,8
+90,12
@@
void Ban_UserBan(client_t *client, char *reason)
SSLi_hash2hex(ban->hash, hexhash);
SSLi_hash2hex(ban->hash, hexhash);
+ char *clientAddressString = Util_clientAddressToString(client);
+
Log_info_client(client, "User kickbanned. Reason: '%s' Hash: %s IP: %s Banned for: %d seconds",
Log_info_client(client, "User kickbanned. Reason: '%s' Hash: %s IP: %s Banned for: %d seconds",
- ban->reason, hexhash, Util_clientAddressToString(client), ban->duration);
+ ban->reason, hexhash, clientAddressString, ban->duration);
+
+ free(clientAddressString);
}
}
@@
-103,9
+107,10
@@
void Ban_pruneBanned()
list_iterate(itr, &banlist) {
ban = list_get_entry(itr, ban_t, node);
#ifdef DEBUG
list_iterate(itr, &banlist) {
ban = list_get_entry(itr, ban_t, node);
#ifdef DEBUG
+ char hexhash[41];
SSLi_hash2hex(ban->hash, hexhash);
Log_debug("BL: User %s Reason: '%s' Hash: %s IP: %s Time left: %d",
SSLi_hash2hex(ban->hash, hexhash);
Log_debug("BL: User %s Reason: '%s' Hash: %s IP: %s Time left: %d",
- ban->name, ban->reason, hexhash, Util_addressToString(&ban->address)
)
,
+ ban->name, ban->reason, hexhash, Util_addressToString(&ban->address),
ban->time + ban->duration - time(NULL));
#endif
/* Duration of 0 = forever */
ban->time + ban->duration - time(NULL));
#endif
/* Duration of 0 = forever */