cb21075d |
1 | // Commands.H -*- C++ -*- |
2 | // Copyright (c) 1997, 1998 Etienne BERNARD |
c6e7af05 |
3 | // Copyright (C) 2002,2005 Clinton Ebadi |
cb21075d |
4 | |
5 | // This program is free software; you can redistribute it and/or modify |
6 | // it under the terms of the GNU General Public License as published by |
7 | // the Free Software Foundation; either version 2 of the License, or |
8 | // any later version. |
9 | |
10 | // This program is distributed in the hope that it will be useful, |
11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | // GNU General Public License for more details. |
14 | |
15 | // You should have received a copy of the GNU General Public License |
16 | // along with this program; if not, write to the Free Software |
c99c411a |
17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 | // 02110-1301, USA. |
cb21075d |
19 | |
20 | #ifndef COMMANDS_H |
21 | #define COMMANDS_H |
22 | |
23 | #include <ctime> |
24 | |
25 | #include "String.H" |
cfa82921 |
26 | |
27 | class Bot; |
71cf2688 |
28 | class Channel; |
29 | class Mask; |
cfa82921 |
30 | class Message; |
71cf2688 |
31 | class User; |
cb21075d |
32 | |
33 | class Commands { |
34 | public: |
35 | static Message Action(Bot *, String, String); |
36 | static Message AddUser(Bot *, String, String, int, int, bool, |
37 | std::time_t, String); |
38 | static Message AddServer(Bot *, String, int); |
39 | static Message AddShit(Bot *, String, String, int, std::time_t, String); |
40 | static Message AddServer(Bot *, String, String); |
41 | static Message Ban(Bot *, String, String); |
42 | static Message ChangeLevel(Bot *, String, String, int); |
672b7d4e |
43 | static Message CTCP (Bot*, std::string, std::string, std::string); |
44 | static Message CTCPReply (Bot*, std::string, std::string, std::string); |
cb21075d |
45 | static Message Cycle(Bot *, String); |
46 | static Message Deban(Bot *, String, String); |
47 | static Message DelServer(Bot *, int); |
48 | static Message DelUser(Bot *, String, String); |
49 | static Message DelShit(Bot *, String, String); |
50 | static Message Deop(Bot *, String, String); |
51 | static Message Die(Bot *, String = "Leaving"); |
52 | static Message Do(Bot *, String); |
53 | static Message Invite(Bot *, String, String); |
54 | static Message Join(Bot *, String, String = ""); |
55 | static Message Keep(Bot *, String, String); |
56 | static Message Kick(Bot *, String, String, String); |
57 | static Message KickBan(Bot *, String, String, String); |
58 | static Message Lock(Bot *, String); |
59 | static Message Mode(Bot *, String, String); |
60 | static Message Msg(Bot *, String, String); |
61 | static Message NextServer(Bot *); |
62 | static Message Nick(Bot *, String); |
63 | static Message Notice(Bot *, String, String); |
64 | static Message Op(Bot *, String, String); |
65 | static Message Part(Bot *, String); |
66 | static Message Reconnect(Bot *); |
67 | static Message Say(Bot *, String, String); |
68 | static Message Server(Bot *, int); |
69 | static Message SetVersion(Bot *, String); |
e171dcce |
70 | static Message SetFloodRate(Bot*, unsigned int); |
cb21075d |
71 | static Message TBan(Bot *, String, String, int); |
72 | static Message TKBan(Bot *, String, String, int, String); |
73 | static Message Topic(Bot *, String, String); |
74 | static Message Unlock(Bot *, String); |
c6e7af05 |
75 | static Message Who (Bot *, String); |
76 | static Message Whois (Bot *, String); |
71cf2688 |
77 | |
78 | private: |
79 | class deop_wildcard : std::unary_function<User &, void> |
80 | { |
81 | Bot *bot; |
82 | Mask &mask; |
83 | const String channel; |
84 | public: |
85 | deop_wildcard (Bot*, Mask&, String&); |
86 | void operator ()(const User &); |
87 | }; |
88 | |
89 | class kick_wildcard : std::unary_function<User &, void> |
90 | { |
91 | Bot *bot; |
92 | Mask &mask; |
93 | const String channel; |
94 | const String reason; |
95 | public: |
96 | kick_wildcard (Bot*, Mask&, String&, String&); |
97 | void operator ()(const User &); |
98 | }; |
cb21075d |
99 | }; |
100 | |
101 | #endif |