channel = ServerInstance->FindChan(channame);
/* Fix by brain - someone needs to learn to validate their input! */
- if ((!target) || (target->registered != REG_ALL) || (!channel))
+ if (!channel)
{
- user->WriteNumeric(Numerics::NoSuchNick(channel ? username.c_str() : channame.c_str()));
+ user->WriteNumeric(Numerics::NoSuchChannel(channame));
+ return CMD_FAILURE;
+ }
+ if ((!target) || (target->registered != REG_ALL))
+ {
+ user->WriteNumeric(Numerics::NoSuchNick(username));
return CMD_FAILURE;
}
{
ConfigTag* tag = ServerInstance->Config->ConfValue("remove");
supportnokicks = tag->getBool("supportnokicks");
- cmd1.protectedrank = cmd2.protectedrank = tag->getInt("protectedrank", 50000);
+ cmd1.protectedrank = cmd2.protectedrank = tag->getUInt("protectedrank", 50000);
}
Version GetVersion() CXX11_OVERRIDE