]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictchans.cpp
m_override now has a 'requirekey' option, that requires a special key of 'override...
[user/henk/code/inspircd.git] / src / modules / m_restrictchans.cpp
index 3344fb26e9da8ed375f8fdae5e26d6f5d8de4289..1838338bd66fca5d814382d2c7ae9465784644b1 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
@@ -50,12 +50,8 @@ class ModuleRestrictChans : public Module
                ReadConfig();
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
-       }
        
-       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
        {
                irc::string x = cname;
                // user is not an oper and its not in the allow list
@@ -64,7 +60,7 @@ class ModuleRestrictChans : public Module
                        // channel does not yet exist (record is null, about to be created IF we were to allow it)
                        if (!chan)
                        {
-                               user->WriteServ("530 %s %s :Only IRC operators may create new channels",user->nick,cname,cname);
+                               user->WriteNumeric(530, "%s %s :Only IRC operators may create new channels",user->nick,cname);
                                return 1;
                        }
                }
@@ -77,7 +73,7 @@ class ModuleRestrictChans : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
 };