summaryrefslogtreecommitdiff
path: root/src/console_cmds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r--src/console_cmds.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 7f4463c2b..cc205f690 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -411,18 +411,11 @@ DEF_CONSOLE_CMD(ConBan)
if (ci != NULL) {
IConsolePrint(CC_DEFAULT, "Client banned");
banip = GetClientIP(ci);
- NetworkServerSendError(client_id, NETWORK_ERROR_KICKED);
} else {
IConsolePrint(CC_DEFAULT, "Client not online, banned IP");
}
- /* Add user to ban-list */
- for (uint index = 0; index < lengthof(_network_ban_list); index++) {
- if (_network_ban_list[index] == NULL) {
- _network_ban_list[index] = strdup(banip);
- break;
- }
- }
+ NetworkServerBanIP(banip);
return true;
}
@@ -613,7 +606,7 @@ DEF_CONSOLE_CMD(ConKick)
}
if (ci != NULL) {
- NetworkServerSendError(client_id, NETWORK_ERROR_KICKED);
+ NetworkServerKickClient(client_id);
} else {
IConsoleError("Client not found");
}