* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
*/
#include "inspircd.h"
-#include "wildcard.h"
/* $ModDesc: Provides support for the /SILENCE command */
*/
if (!ServerInstance->ULine(user->server))
return CMD_FAILURE;
-
+
User *u = ServerInstance->FindNick(parameters[0]);
if (!u)
return CMD_FAILURE;
-
+
if (IS_LOCAL(u))
{
ServerInstance->Parser->CallHandler("SILENCE", std::vector<std::string>(++parameters.begin(), parameters.end()), u);
}
-
+
return CMD_SUCCESS;
}
};
if (parameters.size() > 1) {
pattern = CompilePattern(parameters[1].c_str());
}
-
+
if (!mask.length())
{
// 'SILENCE +' or 'SILENCE -', assume *!*@*
mask = "*!*@*";
}
-
+
ModeParser::CleanMask(mask);
if (action == '-')
case 'c':
p |= SILENCE_CHANNEL;
break;
- case 'i':
+ case 'i':
p |= SILENCE_INVITE;
break;
case 'n':
CommandSVSSilence *cmdsvssilence;
unsigned int maxsilence;
public:
-
+
ModuleSilence(InspIRCd* Me)
: Module(Me), maxsilence(32)
{
{
for (silencelist::const_iterator c = sl->begin(); c != sl->end(); c++)
{
- if (((((c->second & pattern) > 0)) || ((c->second & SILENCE_ALL) > 0)) && (ServerInstance->MatchText(source->GetFullHost(), c->first)))
+ if (((((c->second & pattern) > 0)) || ((c->second & SILENCE_ALL) > 0)) && (InspIRCd::Match(source->GetFullHost(), c->first)))
return !(((c->second & SILENCE_EXCLUDE) > 0));
}
}
virtual ~ModuleSilence()
{
}
-
+
virtual Version GetVersion()
{
- return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
}
};