* Copyright (C) 2009 Robin Burchell <robin+git@viroteck.net>
* Copyright (C) 2009 Matt Smith <dz@inspircd.org>
* Copyright (C) 2009 John Brooks <special@inspircd.org>
- * Copyright (C) 2007-2010 Craig Edwards <brain@inspircd.org>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
+ * Copyright (C) 2006-2010 Craig Edwards <brain@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
/* We cant block a part or quit, so instead we change the reason to 'Reason filtered' */
parameters[parting ? 1 : 0] = "Reason filtered";
- /* We're warning or blocking, OR theyre quitting and its a KILL action
+ /* We're warning or blocking, OR they're quitting and its a KILL action
* (we cant kill someone whos already quitting, so filter them anyway)
*/
if ((f->action == FA_WARN) || (f->action == FA_BLOCK) || (((!parting) && (f->action == FA_KILL))) || (f->action == FA_SILENT))
ConfigTag* tag = i->second;
// If "target" is not found, try the old "channel" key to keep compatibility with 2.0 configs
- const std::string target = tag->getString("target", tag->getString("channel"));
+ const std::string target = tag->getString("target", tag->getString("channel"), 1);
if (!target.empty())
{
if (target[0] == '#')
Version ModuleFilter::GetVersion()
{
- return Version("Provides text (spam) filtering", VF_VENDOR | VF_COMMON, RegexEngine ? RegexEngine->name : "");
+ return Version("Adds the /FILTER command which allows server operators to define regex matches for inappropriate phrases that are not allowed to be used in channel messages, private messages, part messages, or quit messages.", VF_VENDOR | VF_COMMON, RegexEngine ? RegexEngine->name : "");
}
std::string ModuleFilter::EncodeFilter(FilterResult* filter)