/** Holds an entry for a ban list, exemption list, or invite list.
* This class contains a single element in a channel list, such as a banlist.
*/
-class HostItem : public classbase
+class HostItem
{
public:
/** Time the item was added
{
/** Connect a Channel to a User
*/
- static Channel* ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const std::string &privs, bool bursting, bool created);
+ static Channel* ForceChan(Channel* Ptr, User* user, const std::string &privs, bool bursting, bool created);
/** Set default modes for the channel on creation
*/
int maxbans;
public:
- /** Pointer to creator object
- */
- InspIRCd* ServerInstance;
-
/** Creates a channel record and initialises it with default values
* @throw Nothing at present.
*/
- Channel(InspIRCd* Instance, const std::string &name, time_t ts);
+ Channel(const std::string &name, time_t ts);
/** The channel's name.
*/
* @return The number of users left on the channel. If this is zero
* when the method returns, you MUST delete the Channel immediately!
*/
- long ServerKickUser(User* user, const char* reason, const char* servername = NULL);
+ long ServerKickUser(User* user, const char* reason, const std::string& servername = "");
/** Part a user from this channel with the given reason.
* If the reason field is NULL, no reason will be sent.
* been created if the channel did not exist before the user was joined to it.
* If the user could not be joined to a channel, the return value may be NULL.
*/
- static Channel* JoinUser(InspIRCd* ServerInstance, User *user, const char* cn, bool override, const char* key, bool bursting, time_t TS = 0);
+ static Channel* JoinUser(User *user, const char* cn, bool override, const char* key, bool bursting, time_t TS = 0);
/** Write to a channel, from a user, using va_args for text
* @param user User whos details to prefix the line with
* @param text A printf-style format string which builds the output line without prefix
* @param ... Zero or more POD type
*/
- void WriteChannelWithServ(const char* ServName, const char* text, ...) CUSTOM_PRINTF(3, 4);
+ void WriteChannelWithServ(const std::string& ServName, const char* text, ...) CUSTOM_PRINTF(3, 4);
/** Write to a channel, from a server, using std::string for text
* @param ServName Server name to prefix the line with
* @param text A std::string containing the output line without prefix
*/
- void WriteChannelWithServ(const char* ServName, const std::string &text);
+ void WriteChannelWithServ(const std::string& ServName, const std::string &text);
/** Write to all users on a channel except a specific user, using va_args for text.
* Internally, this calls WriteAllExcept().
* the channel (to grant ops to them)
* @param user The user to associate the privilage with
* @param prefix The prefix character to associate
- * @param prefix_rank The rank (value) of this prefix character
* @param adding True if adding the prefix, false when removing
*/
- void SetPrefix(User* user, char prefix, unsigned int prefix_rank, bool adding);
+ void SetPrefix(User* user, char prefix, bool adding);
/** Check if a user is banned on this channel
* @param user A user to check against the banlist
*/
bool IsBanned(User* user);
- /** Check whether an extban of a given type matches
- * a given user for this channel.
- * @param u The user to match bans against
- * @param type The type of extban to check
+ /** Check a single ban for match
*/
- ModResult GetExtBanStatus(User *u, char type);
+ bool CheckBan(User* user, const std::string& banmask);
- /** Overloaded version to check whether a particular string is extbanned
+ /** Get the status of an "action" type extban
*/
- ModResult GetExtBanStatus(const std::string &str, char type);
+ ModResult GetExtBanStatus(User *u, char type);
/** Clears the cached max bans value
*/