]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_alias.cpp
Improved strhashcomp with no allocations
[user/henk/code/inspircd.git] / src / modules / m_alias.cpp
index 57532fc6b9fcff54d1de4e27f5c63a5dda37b282..db3d75baebed43bdfb07fffe0f579b8e42ee07f2 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>
@@ -71,6 +71,11 @@ class ModuleAlias : public Module
                        MyConf = new ConfigReader;
                        ReadAliases();
                }
+
+               void Implements(char* List)
+               {
+                       List[I_OnPreCommand] = List[I_OnRehash] = 1;
+               }
        
                virtual ~ModuleAlias()
                {
@@ -87,8 +92,11 @@ class ModuleAlias : public Module
                        userrec *u = NULL;
                        irc::string c = command.c_str();
 
-                       /* If the command is valid, we dont want to know */
-                       if (validated)
+                       /* If the command is valid, we dont want to know,
+                        * and if theyre not registered yet, we dont want
+                        * to know either
+                        */
+                       if ((validated) || (user->registered != 7))
                                return 0;
                        
                        for (unsigned int i = 0; i < Aliases.size(); i++)