]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_kicknorejoin.cpp
Forward port r9782: show IP (not unknown) for unauthed connections
[user/henk/code/inspircd.git] / src / modules / m_kicknorejoin.cpp
index 1949c8c96dc237b4362e66e29d95ecfbd3a8a038..fba478d011afba1a1d0ad2c04a6c8e81807a9e41 100644 (file)
@@ -46,7 +46,7 @@ class KickRejoin : public ModeHandler
                return (their_param < our_param);
        }
        
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
+       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
                if (!adding)
                {
@@ -124,13 +124,13 @@ public:
        {
                
                kr = new KickRejoin(ServerInstance);
-               if (!ServerInstance->AddMode(kr))
+               if (!ServerInstance->Modes->AddMode(kr))
                        throw ModuleException("Could not add new modes!");
                Implementation eventlist[] = { I_OnCleanup, I_OnChannelDelete, I_OnUserPreJoin, I_OnUserKick };
                ServerInstance->Modules->Attach(eventlist, this, 4);
        }
 
-       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)
        {
                if (chan)
                {
@@ -145,7 +145,7 @@ public:
                                        {
                                                if (iter->first == user)                                        
                                                {
-                                                       user->WriteServ( "495 %s %s :You cannot rejoin this channel yet after being kicked (+J)", user->nick, chan->name);
+                                                       user->WriteServ( "495 %s %s :You cannot rejoin this channel yet after being kicked (+J)", user->nick.c_str(), chan->name.c_str());
                                                        return 1;
                                                }
                                        }
@@ -210,7 +210,7 @@ public:
        
        virtual Version GetVersion()
        {
-               return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 };