]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_namesx.cpp
Prevent using invalid UIDs and enforce UID/SID matching
[user/henk/code/inspircd.git] / src / modules / m_namesx.cpp
index 8c9c4e0c4121c14120c3f4c78d23bababc27b037..ec117e095d8265886d9df9f42fcc6e7459804da7 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -20,7 +20,7 @@ class ModuleNamesX : public Module
 {
  public:
        GenericCap cap;
-       ModuleNamesX(InspIRCd* Me) : Module(Me), cap(this, "multi-prefix")
+       ModuleNamesX() : cap(this, "multi-prefix")
        {
                Implementation eventlist[] = { I_OnPreCommand, I_OnNamesListItem, I_On005Numeric, I_OnEvent };
                ServerInstance->Modules->Attach(eventlist, this, 4);
@@ -33,7 +33,7 @@ class ModuleNamesX : public Module
 
        Version GetVersion()
        {
-               return Version("$Id$",VF_VENDOR);
+               return Version("Provides the NAMESX (CAP multi-prefix) capability.",VF_VENDOR);
        }
 
        void On005Numeric(std::string &output)
@@ -41,7 +41,7 @@ class ModuleNamesX : public Module
                output.append(" NAMESX");
        }
 
-       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
+       ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser *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,
@@ -72,7 +72,7 @@ class ModuleNamesX : public Module
                prefixes = memb->chan->GetAllPrefixChars(memb->user);
        }
 
-       void OnEvent(Event *ev)
+       void OnEvent(Eventev)
        {
                cap.HandleEvent(ev);
        }