]> 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 8d588cf5c8a1d863194e35ba69a66e6a2711af30..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>
@@ -32,6 +32,12 @@ class ModuleAntiBottler : public Module
        {
                Srv = Me;
        }
+
+       void Implements(char* List)
+       {
+               List[I_OnServerRaw] = 1;
+       }
+
        
        virtual ~ModuleAntiBottler()
        {
@@ -47,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))
                        {
@@ -66,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," ");