enum
{
+ // From ircd-ratbox.
+ RPL_HELPSTART = 704,
+ RPL_HELPTXT = 705,
+ RPL_ENDOFHELP = 706,
+
// InspIRCd-specific?
RPL_DCCALLOWSTART = 990,
RPL_DCCALLOWLIST = 991,
RPL_DCCALLOWREMOVED = 995,
ERR_DCCALLOWINVALID = 996,
RPL_DCCALLOWEXPIRED = 997,
- ERR_UNKNOWNDCCALLOWCMD = 998,
- // TODO: These numerics are conflicting and should be removed
- // and be replaced with helpop.
- RPL_DCCALLOWHELP = 998,
- RPL_ENDOFDCCALLOWHELP = 999
+ ERR_UNKNOWNDCCALLOWCMD = 998
};
static const char* const helptext[] =
{
- "DCCALLOW [(+|-)<nick> [<time>]]|[LIST|HELP]",
"You may allow DCCs from specific users by specifying a",
"DCC allow for the user you want to receive DCCs from.",
"For example, to allow the user Brain to send you inspircd.exe",
/* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */
}
- CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE
+ CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
{
/* syntax: DCCALLOW [+|-]<nick> (<time>) */
if (!parameters.size())
return CMD_FAILURE;
}
- RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) CXX11_OVERRIDE
+ RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE
{
return ROUTE_BROADCAST;
}
void DisplayHelp(User* user)
{
+ user->WriteNumeric(RPL_HELPSTART, "*", "DCCALLOW [(+|-)<nick> [<time>]]|[LIST|HELP]");
for (size_t i = 0; i < sizeof(helptext)/sizeof(helptext[0]); i++)
- user->WriteNumeric(RPL_DCCALLOWHELP, helptext[i]);
- user->WriteNumeric(RPL_ENDOFDCCALLOWHELP, "End of DCCALLOW HELP");
+ user->WriteNumeric(RPL_HELPTXT, "*", helptext[i]);
+ user->WriteNumeric(RPL_ENDOFHELP, "*", "End of DCCALLOW HELP");
LocalUser* localuser = IS_LOCAL(user);
if (localuser)
if (InspIRCd::Match(filename, bfl[i].filemask, ascii_case_insensitive_map))
{
/* We have a matching badfile entry, override whatever the default action is */
- if (bfl[i].action == "allow")
+ if (stdalgo::string::equalsci(bfl[i].action, "allow"))
return MOD_RES_PASSTHRU;
else
{
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("dccallow");
- cmd.maxentries = tag->getInt("maxentries", 20);
+ cmd.maxentries = tag->getUInt("maxentries", 20);
bfl.clear();
ConfigTagList tags = ServerInstance->Config->ConfTags("banfile");