public:
CommandChghost(Module* Creator, char* hmap) : Command(Creator,"CHGHOST", 2), hostmap(hmap)
{
- flags_needed = 'o'; syntax = "<nick> <newhost>";
+ flags_needed = 'o';
+ syntax = "<nick> <newhost>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
CmdResult Handle(const std::vector<std::string> ¶meters, User *user)
{
- const char * x = parameters[1].c_str();
+ const char* x = parameters[1].c_str();
for (; *x; x++)
{
return CMD_FAILURE;
}
}
- if (parameters[1].empty())
- {
- user->WriteServ("NOTICE %s :*** CHGHOST: Host must be specified", user->nick.c_str());
- return CMD_FAILURE;
- }
if ((parameters[1].c_str() - x) > 63)
{
CommandChghost cmd;
char hostmap[256];
public:
- ModuleChgHost(InspIRCd* Me) : cmd(this, hostmap)
+ ModuleChgHost() : cmd(this, hostmap)
{
OnRehash(NULL);
ServerInstance->AddCommand(&cmd);
void OnRehash(User* user)
{
- ConfigReader Conf(ServerInstance);
+ ConfigReader Conf;
std::string hmap = Conf.ReadValue("hostname", "charmap", 0);
if (hmap.empty())
Version GetVersion()
{
- return Version("$Id$", VF_OPTCOMMON | VF_VENDOR, API_VERSION);
+ return Version("Provides support for the CHGHOST command", VF_OPTCOMMON | VF_VENDOR);
}
};