1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
24 #include "helperfuncs.h"
26 /* $ModDesc: Provides support for the SETNAME command */
30 void handle_setname(char **parameters, int pcnt, userrec *user)
32 std::string line = "";
33 for (int i = 0; i < pcnt-1; i++)
35 line = line + std::string(parameters[i]);
37 line = line + std::string(parameters[pcnt-1]);
38 Srv->ChangeGECOS(user,line);
42 class ModuleSetName : public Module
48 Srv->AddCommand("SETNAME",handle_setname,0,1,"m_setname.so");
51 virtual ~ModuleSetName()
56 virtual Version GetVersion()
58 return Version(1,0,0,1,VF_VENDOR);
63 // stuff down here is the module-factory stuff. For basic modules you can ignore this.
65 class ModuleSetNameFactory : public ModuleFactory
68 ModuleSetNameFactory()
72 ~ModuleSetNameFactory()
76 virtual Module * CreateModule()
78 return new ModuleSetName;
84 extern "C" void * init_module( void )
86 return new ModuleSetNameFactory;