Split user list from Channel into ChannelUserList
[clinton/bobotpp.git] / source / UserCommands.H
CommitLineData
cb21075d 1// UserCommands.H -*- C++ -*-
2// Copyright (c) 1997, 1998 Etienne BERNARD
3
4// This program is free software; you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation; either version 2 of the License, or
7// any later version.
8
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with this program; if not, write to the Free Software
c99c411a 16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17// 02110-1301, USA.
cb21075d 18
19#ifndef USERCOMMANDS_H
20#define USERCOMMANDS_H
21
22#include "String.H"
cb21075d 23
71cf2688 24#include <functional>
25
cfa82921 26class Person;
27class ServerConnection;
71cf2688 28class User;
cb21075d 29
30class UserCommands {
31public:
32 static void Action(ServerConnection *, Person *, String, String);
33 static void AddUser(ServerConnection *, Person *, String, String);
34 static void AddServer(ServerConnection *, Person *, String, String);
35 static void AddShit(ServerConnection *, Person *, String, String);
36 static void Alias(ServerConnection *, Person *, String, String);
37 static void Ban(ServerConnection *, Person *, String, String);
38 static void BanList(ServerConnection *, Person *, String, String);
39 static void ChangeLevel(ServerConnection *, Person *, String, String);
40 static void Channels(ServerConnection *, Person *, String, String);
41 static void Cycle(ServerConnection *, Person *, String, String);
42 static void DCCList(ServerConnection *, Person *, String, String);
43 static void Deban(ServerConnection *, Person *, String, String);
44 static void DelServer(ServerConnection *, Person *, String, String);
45 static void DelUser(ServerConnection *, Person *, String, String);
46 static void DelShit(ServerConnection *, Person *, String, String);
47 static void Deop(ServerConnection *, Person *, String, String);
48 static void Die(ServerConnection *, Person *, String, String);
49 static void Do(ServerConnection *, Person *, String, String);
50#ifdef USESCRIPTS
51 static void Execute(ServerConnection *, Person *, String, String);
52#endif
53 static void Help(ServerConnection *, Person *, String, String);
54 static void Ident(ServerConnection *, Person *, String, String);
55 static void Invite(ServerConnection *, Person *, String, String);
56 static void Join(ServerConnection *, Person *, String, String);
57 static void Keep(ServerConnection *, Person *, String, String);
58 static void Kick(ServerConnection *, Person *, String, String);
59 static void KickBan(ServerConnection *, Person *, String, String);
60 static void Load(ServerConnection *, Person *, String, String);
61#ifdef USESCRIPTS
62 static void LoadScript(ServerConnection *, Person *, String, String);
63#endif
64 static void Lock(ServerConnection *, Person *, String, String);
65 static void Mode(ServerConnection *, Person *, String, String);
66 static void Msg(ServerConnection *, Person *, String, String);
67 static void Names(ServerConnection *, Person *, String, String);
68 static void NextServer(ServerConnection *, Person *, String, String);
69 static void Nick(ServerConnection *, Person *, String, String);
70 static void NsLookup(ServerConnection *, Person *, String, String);
71 static void Op(ServerConnection *, Person *, String, String);
72 static void Part(ServerConnection *, Person *, String, String);
73 static void Password(ServerConnection *, Person *, String, String);
74 static void Reconnect(ServerConnection *, Person *, String, String);
75 static void RSpyMessage(ServerConnection *, Person *, String, String);
76 static void Save(ServerConnection *, Person *, String, String);
77 static void Say(ServerConnection *, Person *, String, String);
78 static void Server(ServerConnection *, Person *, String, String);
79 static void ServerList(ServerConnection *, Person *, String, String);
e171dcce 80 static void SetFloodRate(ServerConnection *, Person *, String, String);
cb21075d 81 static void SetVersion(ServerConnection *, Person *, String, String);
82 static void ShitList(ServerConnection *, Person *, String, String);
83 static void SpyList(ServerConnection *, Person *, String, String);
84 static void SpyMessage(ServerConnection *, Person *, String, String);
85 static void Stats(ServerConnection *, Person *, String, String);
86 static void TBan(ServerConnection *, Person *, String, String);
87 static void TKBan(ServerConnection *, Person *, String, String);
88 static void Topic(ServerConnection *, Person *, String, String);
89 static void Unlock(ServerConnection *, Person *, String, String);
90 static void UserList(ServerConnection *, Person *, String, String);
91 static void Who(ServerConnection *, Person *, String, String);
92 static void Whois(ServerConnection *, Person *, String, String);
71cf2688 93
94private:
95 struct map_names : std::unary_function<User &, void>
96 {
97 Person *from;
98 std::string &result;
99 unsigned int length;
100
101 map_names (Person*, std::string&);
102 void operator() (const User &);
103 };
cb21075d 104};
105
106#endif