1 // Channel.H -*- C++ -*-
2 // Copyright (c) 1997, 1998 Etienne BERNARD
3 // Copyright (C) 2002 Clinton Ebadi
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
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.
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
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
34 class ServerConnection;
40 #define DEFAULT_KEEPMODES "iklmnpst"
42 // This struct is used to keep information about
43 // the channel we want to join, the modes we
44 // want to set/keep on these channels, and the
46 struct wantedChannel {
51 wantedChannel(String m, String kp, String ky)
52 : mode(m), keep(kp), key(ky) { }
70 std::map<String, User *, std::less<String> > channelMemory;
71 std::vector<BanEntry *> channelBanlist;
72 ServerConnection * cnx;
79 INVITE_ONLY = 4, // +i
80 TOPIC_RESTRICTED = 8, // +t
81 EXTMSG_RESTRICTED = 16, // +n
83 HAS_KEY = 64, // +k <key>
84 IS_LIMITED = 128 // +l <limit>
87 Channel(ServerConnection *, String, String);
90 void addNick(String, String, int, UserList *, bool = false);
92 void changeNick(String, String);
94 User * getUser(String);
96 void addBan(String, std::time_t = -1);
99 void parseMode(Person *, String);
104 friend class Commands;
105 friend class UserCommands;