]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy...
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index 363da21d753ed9740f2d76f36f4f93d744b5bdfb..56be984b665c3b206a301cc82d3353fe92039c41 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
@@ -16,7 +16,7 @@
 
 /* $ModDesc: Allows an extended ban (+b) syntax redirecting banned users to another channel */
 
-/* Originally written by Om, January 2007
+/* Originally written by Om, January 2008
  */
 
 class BanRedirectEntry
@@ -193,7 +193,7 @@ class ModuleBanRedirect : public Module
                re = new BanRedirect(Me);
                nofollow = false;
                
-               if(!ServerInstance->AddModeWatcher(re))
+               if(!ServerInstance->Modes->AddModeWatcher(re))
                {
                        delete re;
                        throw ModuleException("Could not add mode watcher");
@@ -202,7 +202,7 @@ class ModuleBanRedirect : public Module
                OnRehash(NULL, "");
 
                Implementation list[] = { I_OnRehash, I_OnUserPreJoin, I_OnChannelDelete, I_OnCleanup };
-               Me->Modules->Attach(list, this, sizeof(list));
+               Me->Modules->Attach(list, this, sizeof(*list));
 
        }
        
@@ -307,7 +307,7 @@ class ModuleBanRedirect : public Module
                                                        user->WriteServ("474 %s %s :Cannot join channel (You are banned)", user->nick, chan->name);
                                                        user->WriteServ("470 %s :You are being automatically redirected to %s", user->nick, redir->targetchan.c_str());
                                                        nofollow = true;
-                                                       Channel::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", ServerInstance->Time(true));
+                                                       Channel::JoinUser(ServerInstance, user, redir->targetchan.c_str(), false, "", false, ServerInstance->Time(true));
                                                        nofollow = false;
                                                        return 1;
                                                }