2 * SETHOST module for InspIRCD
6 * Syntax: /SETHOST [new host]
7 * Changes the user's DHOST who issues the command
18 /* $ModDesc: Provides support for the SETHOST command */
22 void handle_sethost(char **parameters, int pcnt, userrec *user)
24 strncpy(user->dhost,parameters[0],127);
25 Srv->SendOpers(std::string(user->nick)+" used SETHOST to change their displayed host to "+std::string(parameters[1]));
29 class ModuleSetHost : public Module
35 Srv->AddCommand("SETHOST",handle_sethost,'o',1);
38 virtual ~ModuleSetHost()
43 virtual Version GetVersion()
45 return Version(1,0,0,0);
50 // stuff down here is the module-factory stuff. For basic modules you can ignore this.
52 class ModuleSetHostFactory : public ModuleFactory
55 ModuleSetHostFactory()
59 ~ModuleSetHostFactory()
63 virtual Module * CreateModule()
65 return new ModuleSetHost;
71 extern "C" void * init_module( void )
73 return new ModuleSetHostFactory;