]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_antibottler.cpp
Move Blocking/NonBlocking to socket.cpp and make inline
[user/henk/code/inspircd.git] / src / modules / m_antibottler.cpp
index 7d7f680843eb3ed6b9a8b3430d140ad4f22b584d..58ee0b5d6c562f49d18c3bf0d92dd7b6fff2649b 100644 (file)
@@ -33,10 +33,10 @@ class ModuleAntiBottler : public Module
                Srv = Me;
        }
 
-        void Implements(char* List)
-        {
-                List[I_OnServerRaw] = 1;
-        }
+       void Implements(char* List)
+       {
+               List[I_OnServerRaw] = 1;
+       }
 
        
        virtual ~ModuleAntiBottler()
@@ -53,7 +53,7 @@ class ModuleAntiBottler : public Module
                if (inbound)
                {
                        char data[MAXBUF];
-                       strncpy(data,raw.c_str(),MAXBUF);
+                       strlcpy(data,raw.c_str(),MAXBUF);
                        bool not_bottler = false;
                        if (!strncmp(data,"user ",5))
                        {
@@ -72,11 +72,6 @@ class ModuleAntiBottler : public Module
                                if (!(data) || !(*data))
                                        return;
 
-                               /*
-                                * slight efficiency fix: strtok() just returns NULL if it has no more
-                                * tokens to return. Plus strlen's here really could have been replaced
-                                * with above pointer voodoo :-). --w00t
-                                */
                                strtok(data," ");
                                char *ident = strtok(NULL," ");
                                char *local = strtok(NULL," ");