]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_namesx.cpp
YAY for LDAP oper blocks! :D
[user/henk/code/inspircd.git] / src / modules / m_namesx.cpp
index 65fb6c6c22bc07203e7938cda88c13211f959cdb..83541417b176f1a11044238940fe29949afe9a3b 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -24,12 +24,10 @@ class ModuleNamesX : public Module
        ModuleNamesX(InspIRCd* Me)
                : Module(Me)
        {
+               Implementation eventlist[] = { I_OnSyncUserMetaData, I_OnPreCommand, I_OnUserList, I_On005Numeric };
+               ServerInstance->Modules->Attach(eventlist, this, 4);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnSyncUserMetaData] = List[I_OnPreCommand] = List[I_OnUserList] = List[I_On005Numeric] = 1;
-       }
 
        virtual ~ModuleNamesX()
        {
@@ -51,7 +49,7 @@ class ModuleNamesX : public Module
                output.append(" NAMESX");
        }
 
-       virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+       virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
        {
                irc::string c = command.c_str();
                /* We don't actually create a proper command handler class for PROTOCTL,