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 * ---------------------------------------------------
23 /* $ModDesc: Provides support for the SETNAME command */
27 void handle_setname(char **parameters, int pcnt, userrec *user)
29 std::string line = "";
30 for (int i = 0; i < pcnt-1; i++)
32 line = line + std::string(parameters[i]);
34 line = line + std::string(parameters[pcnt-1]);
35 Srv->ChangeGECOS(user,line);
39 class ModuleSetName : public Module
45 Srv->AddCommand("SETNAME",handle_setname,0,1,"m_setname.so");
48 virtual ~ModuleSetName()
53 virtual Version GetVersion()
55 return Version(1,0,0,1,VF_VENDOR);
60 // stuff down here is the module-factory stuff. For basic modules you can ignore this.
62 class ModuleSetNameFactory : public ModuleFactory
65 ModuleSetNameFactory()
69 ~ModuleSetNameFactory()
73 virtual Module * CreateModule()
75 return new ModuleSetName;
81 extern "C" void * init_module( void )
83 return new ModuleSetNameFactory;