]> 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 5c0b6e593b4ffde1e86df7cca5af8fecbae8d2cb..58ee0b5d6c562f49d18c3bf0d92dd7b6fff2649b 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
  *                       E-mail:
  *                <brain@chatspike.net>
  *               <Craig@chatspike.net>
@@ -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," ");