]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_flashpolicyd.cpp
Fix an shadowing warning in the spanningtree module.
[user/henk/code/inspircd.git] / src / modules / m_flashpolicyd.cpp
index d7f9a793b617d696006788a122fe07c9e6df5c85..923c0cbffc6870c10ab86eab446b1be50dc114d1 100644 (file)
@@ -97,7 +97,6 @@ class ModuleFlashPD : public Module
        void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                ConfigTag* tag = ServerInstance->Config->ConfValue("flashpolicyd");
-               timeout = tag->getDuration("timeout", 5, 1);
                std::string file = tag->getString("file");
 
                if (!file.empty())
@@ -109,10 +108,7 @@ class ModuleFlashPD : public Module
                        }
                        catch (CoreException&)
                        {
-                               const std::string error_message = "A file was specified for FlashPD, but it could not be loaded.";
-                               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, error_message);
-                               ServerInstance->SNO->WriteGlobalSno('a', error_message);
-                               policy_reply.clear();
+                               throw ModuleException("A file was specified for FlashPD, but it could not be loaded at " + tag->getTagLocation());
                        }
                        return;
                }
@@ -144,6 +140,7 @@ class ModuleFlashPD : public Module
 <site-control permitted-cross-domain-policies=\"master-only\"/>\
 <allow-access-from domain=\"*\" to-ports=\"" + to_ports + "\" />\
 </cross-domain-policy>";
+               timeout = tag->getDuration("timeout", 5, 1);
        }
 
        CullResult cull() CXX11_OVERRIDE
@@ -158,7 +155,7 @@ class ModuleFlashPD : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Flash Policy Daemon. Allows Flash IRC clients to connect", VF_VENDOR);
+               return Version("Flash Policy Daemon, allows Flash IRC clients to connect", VF_VENDOR);
        }
 };