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 * ---------------------------------------------------
22 #include "helperfuncs.h"
24 /* $ModDesc: Provides support for the SETNAME command */
28 void handle_setname(char **parameters, int pcnt, userrec *user)
30 std::string line = "";
31 for (int i = 0; i < pcnt-1; i++)
33 line = line + std::string(parameters[i]);
35 line = line + std::string(parameters[pcnt-1]);
36 Srv->ChangeGECOS(user,line);
40 class ModuleSetName : public Module
46 Srv->AddCommand("SETNAME",handle_setname,0,1,"m_setname.so");
49 virtual ~ModuleSetName()
54 virtual Version GetVersion()
56 return Version(1,0,0,1,VF_VENDOR);
61 // stuff down here is the module-factory stuff. For basic modules you can ignore this.
63 class ModuleSetNameFactory : public ModuleFactory
66 ModuleSetNameFactory()
70 ~ModuleSetNameFactory()
74 virtual Module * CreateModule()
76 return new ModuleSetName;
82 extern "C" void * init_module( void )
84 return new ModuleSetNameFactory;