]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_banredirect.cpp
Remove NULL checks from various Channel functions
[user/henk/code/inspircd.git] / src / modules / m_banredirect.cpp
index 8e4c5c6e52d50ef45a288fd2532c70b1d8f514b0..c79023ccf5f0bd85222684906ee2e974e5d49d01 100644 (file)
@@ -50,7 +50,7 @@ class BanRedirect : public ModeWatcher
  public:
        SimpleExtItem<BanRedirectList> extItem;
        BanRedirect(Module* parent)
-               : ModeWatcher(parent, 'b', MODETYPE_CHANNEL)
+               : ModeWatcher(parent, "ban", MODETYPE_CHANNEL)
                , ban(parent, "ban")
                , extItem("banredirect", parent)
        {
@@ -228,9 +228,7 @@ class ModuleBanRedirect : public Module
 
        void init() CXX11_OVERRIDE
        {
-               if(!ServerInstance->Modes->AddModeWatcher(&re))
-                       throw ModuleException("Could not add mode watcher");
-
+               ServerInstance->Modes->AddModeWatcher(&re);
                ServerInstance->Modules->AddService(re.extItem);
                Implementation list[] = { I_OnUserPreJoin };
                ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));