Fix kick behavior

This commit is contained in:
calzoneman 2014-10-25 22:49:22 -05:00
parent 5d74559278
commit 575b762ba1
3 changed files with 3 additions and 4 deletions

View File

@ -334,7 +334,6 @@ Channel.prototype.acceptUser = function (user) {
if (user.socket._isUsingTor) {
if (this.modules.options && this.modules.options.get("torbanned")) {
user.kick("This channel has banned connections from Tor.");
user.socket.disconnect(true);
this.logger.log("[login] Blocked connection from Tor exit at " +
user.displayip);
return;

View File

@ -87,7 +87,7 @@ function ipLimitReached(sock) {
sock.emit("kick", {
reason: "Too many connections from your IP address"
});
sock.disconnect(true);
sock.disconnect();
return;
}
}
@ -154,7 +154,7 @@ function handleConnection(sock) {
if (db.isGlobalIPBanned(ip)) {
Logger.syslog.log("Rejecting " + ip + " - global banned");
sock.emit("kick", { reason: "Your IP is globally banned." });
sock.disconnect(true);
sock.disconnect();
return;
}

View File

@ -219,7 +219,7 @@ User.prototype.autoAFK = function () {
User.prototype.kick = function (reason) {
this.socket.emit("kick", { reason: reason });
this.socket.disconnect(true);
this.socket.disconnect();
};
User.prototype.initAdminCallbacks = function () {