mirror of https://github.com/calzoneman/sync.git
Fix kick behavior
This commit is contained in:
parent
5d74559278
commit
575b762ba1
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue