]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/commands/cmd_who.h
7ad99620b3c3be3e9a730ee50a4b594aa414890b
[user/henk/code/inspircd.git] / include / commands / cmd_who.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2009 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 #ifndef __CMD_WHO_H__
15 #define __CMD_WHO_H__
16
17 // include the common header files
18
19 #include "users.h"
20 #include "channels.h"
21
22 /** Handle /WHO. These command handlers can be reloaded by the core,
23  * and handle basic RFC1459 commands. Commands within modules work
24  * the same way, however, they can be fully unloaded, where these
25  * may not.
26  */
27 class CommandWho : public Command
28 {
29         bool CanView(Channel* chan, User* user);
30         bool opt_viewopersonly;
31         bool opt_showrealhost;
32         bool opt_unlimit;
33         bool opt_realname;
34         bool opt_mode;
35         bool opt_ident;
36         bool opt_metadata;
37         bool opt_port;
38         bool opt_away;
39         bool opt_local;
40         bool opt_far;
41         bool opt_time;
42
43  public:
44         /** Constructor for who.
45          */
46         CommandWho (InspIRCd* Instance) : Command(Instance,"WHO", 0, 1, false, 2) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohurmMiaplf]"; }
47         void SendWhoLine(User* user, const std::string &initial, Channel* ch, User* u, std::vector<std::string> &whoresults);
48         /** Handle command.
49          * @param parameters The parameters to the comamnd
50          * @param pcnt The number of parameters passed to teh command
51          * @param user The user issuing the command
52          * @return A value from CmdResult to indicate command success or failure.
53          */
54         CmdResult Handle(const std::vector<std::string>& parameters, User *user);
55         bool whomatch(User* user, const char* matchtext);
56 };
57
58 #endif