aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/commands/mod/unban.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/src/commands/mod/unban.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/src/commands/mod/unban.js b/server/src/commands/mod/unban.js
index cc1016a..193b614 100644
--- a/server/src/commands/mod/unban.js
+++ b/server/src/commands/mod/unban.js
@@ -10,11 +10,15 @@ exports.run = async (core, server, socket, data) => {
return;
}
- let ip = String(data.ip);
- let nick = String(data.nick); // for future upgrade
+ if (typeof data.ip !== 'string') {
+ return;
+ }
+
+ let ip = data.ip;
+ let nick = data.nick; // for future upgrade
- // TODO: remove ip from ratelimiter
- // POLICE.pardon(ip)
+ // TODO: support remove by nick future upgrade
+ server._police.pardon(badClient.remoteAddress);
console.log(`${socket.nick} [${socket.trip}] unbanned ${/*nick || */ip} in ${socket.channel}`);
server.reply({