]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
Move authorization from USER to USERS
[stg.git] / projects / stargazer / plugins / authorization / inetaccess / inetaccess.cpp
index 58d9259f68f124a433b00ec44ff4e6ce54991287..6219a1a88f695e5b2dbf5b6dff506bcd0d0d6e8a 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/select.h>
 #include <unistd.h> // usleep, close
 
 #include <csignal>
 #include <unistd.h> // usleep, close
 
 #include <csignal>
@@ -837,7 +836,7 @@ if ((*user)->GetAuthorized() && (*user)->GetCurrIP() != sip)
 USER_PTR u;
 if (users->FindByIPIdx(sip, &u) == 0 && u->GetLogin() != (*user)->GetLogin())
     {
 USER_PTR u;
 if (users->FindByIPIdx(sip, &u) == 0 && u->GetLogin() != (*user)->GetLogin())
     {
-    printfd(__FILE__, "IP address already in use. IP \'%s\'", inet_ntostring(sip).c_str());
+    printfd(__FILE__, "IP address already in use. IP \'%s\'\n", inet_ntostring(sip).c_str());
     WriteServLog("IP address already in use. IP \'%s\'", inet_ntostring(sip).c_str());
     SendError(sip, sport, protoVer, "÷ÁÛ IP ÁÄÒÅÓ ÕÖÅ ÉÓÐÏÌØÚÕÅÔÓÑ!");
     return 0;
     WriteServLog("IP address already in use. IP \'%s\'", inet_ntostring(sip).c_str());
     SendError(sip, sport, protoVer, "÷ÁÛ IP ÁÄÒÅÓ ÕÖÅ ÉÓÐÏÌØÚÕÅÔÓÑ!");
     return 0;
@@ -1764,34 +1763,6 @@ ip2user.erase(it);
 return ret;
 }
 //-----------------------------------------------------------------------------
 return ret;
 }
 //-----------------------------------------------------------------------------
-bool AUTH_IA::WaitPackets(int sd) const
-{
-fd_set rfds;
-FD_ZERO(&rfds);
-FD_SET(sd, &rfds);
-
-struct timeval tv;
-tv.tv_sec = 0;
-tv.tv_usec = 500000;
-
-int res = select(sd + 1, &rfds, NULL, NULL, &tv);
-if (res == -1) // Error
-    {
-    if (errno != EINTR)
-        {
-        printfd(__FILE__, "Error on select: '%s'\n", strerror(errno));
-        }
-    return false;
-    }
-
-if (res == 0) // Timeout
-    {
-    return false;
-    }
-
-return true;
-}
-//-----------------------------------------------------------------------------
 inline
 void InitEncrypt(BLOWFISH_CTX * ctx, const string & password)
 {
 inline
 void InitEncrypt(BLOWFISH_CTX * ctx, const string & password)
 {