]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_uhnames.cpp
YAY for LDAP oper blocks! :D
[user/henk/code/inspircd.git] / src / modules / m_uhnames.cpp
index 574f907416dc61c39dca24cafeb1ecfd80f29081..dddf45591dbe2fb8f18755a1834d5488f2ad362a 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
@@ -25,12 +25,10 @@ class ModuleUHNames : public Module
        ModuleUHNames(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 ~ModuleUHNames()
        {
@@ -58,7 +56,7 @@ class ModuleUHNames : public Module
                ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, &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,