/*
* InspIRCd -- Internet Relay Chat Daemon
*
+ * Copyright (C) 2019 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2018 linuxdaemon <linuxdaemon.irc@gmail.com>
+ * Copyright (C) 2017-2018, 2020 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2014 JustArchi <JustArchi@JustArchi.net>
+ * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
* Copyright (C) 2013 Daniel Vassdal <shutter@canternet.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
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())
}
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;
}
for (std::vector<ListenSocket*>::const_iterator i = ServerInstance->ports.begin(); i != ServerInstance->ports.end(); ++i)
{
ListenSocket* ls = *i;
- if (!stdalgo::string::equalsci(ls->bind_tag->getString("type", "clients"), "clients") || !ls->bind_tag->getString("ssl").empty())
+ if (!stdalgo::string::equalsci(ls->bind_tag->getString("type", "clients", 1), "clients"))
+ continue;
+
+ if (!ls->bind_tag->getString("ssl").empty())
continue;
to_ports.append(ConvToStr(ls->bind_sa.port())).push_back(',');
<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
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Flash Policy Daemon. Allows Flash IRC clients to connect", VF_VENDOR);
+ return Version("Allows connection policies to be served to IRC clients that use Adobe Flash.", VF_VENDOR);
}
};