26 #include "membership.h"
63 static Channel* ForceChan(
Channel* Ptr,
User* user,
const std::string &privs,
bool bursting,
bool created);
67 void SetDefaultModes();
79 std::bitset<64> modes;
84 CustomModeList custom_mode_params;
90 Channel(
const std::string &name, time_t ts);
128 void SetMode(
char mode,
bool mode_on);
135 void SetModeParam(
ModeHandler* mode,
const std::string& parameter);
136 void SetModeParam(
char mode,
const std::string& parameter);
142 inline bool IsModeSet(
char mode) {
return modes[mode-
'A']; }
143 inline bool IsModeSet(
ModeHandler* mode) {
return modes[mode->GetModeChar()-
'A']; }
156 std::string GetModeParameter(
char mode);
164 int SetTopic(
User *u, std::string &t,
bool forceset =
false);
173 long GetUserCounter();
188 void DelUser(
User* user);
199 const UserMembList* GetUsers();
205 bool HasUser(
User* user);
214 void KickUser(
User *src,
User *user,
const char* reason);
221 void PartUser(
User *user, std::string &reason);
232 static Channel* JoinUser(
User *user,
const char* cn,
bool override,
const char* key,
bool bursting, time_t TS = 0);
239 void WriteChannel(
User* user,
const char* text, ...) CUSTOM_PRINTF(3, 4);
245 void WriteChannel(
User* user, const std::
string &text);
252 void WriteChannelWithServ(const std::
string& ServName, const
char* text, ...) CUSTOM_PRINTF(3, 4);
258 void WriteChannelWithServ(const std::
string& ServName, const std::
string &text);
269 void WriteAllExceptSender(
User* user,
bool serversource,
char status, const
char* text, ...) CUSTOM_PRINTF(5, 6);
280 void WriteAllExcept(
User* user,
bool serversource,
char status, CUList &except_list, const
char* text, ...) CUSTOM_PRINTF(6, 7);
290 void WriteAllExceptSender(
User* user,
bool serversource,
char status, const std::
string& text);
300 void WriteAllExcept(
User* user,
bool serversource,
char status, CUList &except_list, const std::
string& text);
302 void RawWriteAllExcept(
User* user,
bool serversource,
char status, CUList &except_list, const std::
string& text);
314 char* ChanModes(
bool showkey);
319 void UserList(
User *user);
324 int CountInvisible();
337 const
char* GetPrefixChar(
User *user);
345 const
char* GetAllPrefixChars(
User* user);
358 unsigned int GetPrefixValue(
User* user);
365 void RemoveAllPrefixes(
User* user);
376 bool SetPrefix(
User* user,
char prefix,
bool adding);
382 bool IsBanned(
User* user);
386 bool CheckBan(
User* user, const std::
string& banmask);