]> git.stg.codes - stg.git/commitdiff
Immediate disconnect on Unauthorize if not authorized.
authorMaxim Mamontov <faust.madf@gmail.com>
Sun, 20 Dec 2015 20:17:35 +0000 (22:17 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Sun, 20 Dec 2015 20:17:35 +0000 (22:17 +0200)
projects/stargazer/user_impl.cpp

index 3693057692592f549084729b6769b588018f8211..5d505307a72302bbddccbe92be280aefdea592a7 100644 (file)
@@ -557,6 +557,8 @@ if (authorizedBy.empty())
     lastDisconnectReason = reason;
     lastIPForDisconnect = currIP;
     currIP = 0; // DelUser in traffcounter
+    if (connected)
+        Disconnect(false, "not authorized");
     return;
     }
 }