#include "inspircd.h"
+#include "modules/whois.h"
+
+enum
+{
+ // From AustHex.
+ RPL_WHOISSERVICE = 310,
+
+ // From UnrealIRCd.
+ ERR_KILLDENY = 485
+};
/** Handles user mode +k
*/
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Provides usermode +k to protect services from kicks, kills, and mode changes.", VF_VENDOR);
+ return Version("Provides user mode +k to protect services from kicks, kills, and mode changes", VF_VENDOR);
}
void OnWhois(Whois::Context& whois) CXX11_OVERRIDE
{
if (whois.GetTarget()->IsModeSet(bm))
{
- whois.SendLine(310, "is a Network Service on " + ServerInstance->Config->Network);
+ whois.SendLine(RPL_WHOISSERVICE, "is a Network Service on " + ServerInstance->Config->Network);
}
}
if (dst->IsModeSet(bm))
{
- src->WriteNumeric(485, InspIRCd::Format("You are not permitted to kill %s services!", ServerInstance->Config->Network.c_str()));
+ src->WriteNumeric(ERR_KILLDENY, InspIRCd::Format("You are not permitted to kill %s services!", ServerInstance->Config->Network.c_str()));
ServerInstance->SNO->WriteGlobalSno('a', src->nick+" tried to kill service "+dst->nick+" ("+reason+")");
return MOD_RES_DENY;
}