]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_commands.cpp
Begone shitty safe stl warnings!
[user/henk/code/inspircd.git] / src / cmd_commands.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #include "inspircd.h"
15 #include "users.h"
16 #include "commands/cmd_commands.h"
17
18 /** Handle /COMMANDS
19  */
20 extern "C" DllExport command_t* init_command(InspIRCd* Instance)
21 {
22         return new cmd_commands(Instance);
23 }
24
25 CmdResult cmd_commands::Handle (const char** parameters, int pcnt, userrec *user)
26 {
27         for (command_table::iterator i = ServerInstance->Parser->cmdlist.begin(); i != ServerInstance->Parser->cmdlist.end(); i++)
28         {
29                 user->WriteServ("902 %s :%s %s %d",user->nick,i->second->command.c_str(),i->second->source.c_str(),i->second->min_params);
30         }
31         user->WriteServ("903 %s :End of COMMANDS list",user->nick);
32         return CMD_SUCCESS;
33 }