* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
virtual Version GetVersion()
{
- return Version("$Id$",VF_VENDOR,API_VERSION);
+ return Version("$Id$",VF_COMMON|VF_VENDOR,API_VERSION);
}
virtual int OnUserPreMessage(User *user, void *dest, int target_type, std::string &text, char status, CUList &exempt_list)
if (target_type == TYPE_CHANNEL)
{
- if (((Channel *)dest)->IsExtBanned(user, 'm'))
+ if (((Channel *)dest)->GetExtBanStatus(user, 'm') < 0)
{
- user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Cannot send to " + ((Channel *)dest)->name + ", as you are muted");
+ user->WriteNumeric(404, "%s %s :Cannot send to channel (you're muted)",user->nick.c_str(), ((Channel *)dest)->name.c_str());
return 1;
}
}
if (target_type == TYPE_CHANNEL)
{
- if (((Channel *)dest)->IsExtBanned(user, 'm'))
+ if (((Channel *)dest)->GetExtBanStatus(user, 'm') < 0)
{
- user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Cannot send to " + ((Channel *)dest)->name + ", as you are muted");
+ user->WriteNumeric(404, "%s %s :Cannot send to channel (you're muted)",user->nick.c_str(), ((Channel *)dest)->name.c_str());
return 1;
}
}