X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fchannels.h;h=0a131ddb35eca048542de758537c2a835819bbdb;hb=804d58e2001f04786d2594f046d591b664235642;hp=eeb2501fa5bc7a44763ff793f880109291707079;hpb=63601e946e77f11835cf9cbb87c55fe41e0b12bb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/channels.h b/include/channels.h index eeb2501fa..0a131ddb3 100644 --- a/include/channels.h +++ b/include/channels.h @@ -34,12 +34,12 @@ * This class represents a channel, and contains its name, modes, topic, topic set time, * etc, and an instance of the BanList type. */ -class CoreExport Channel : public Extensible, public InviteBase +class CoreExport Channel : public Extensible { public: /** A map of Memberships on a channel keyed by User pointers */ - typedef std::map MemberMap; + typedef std::map > MemberMap; private: /** Set default modes for the channel on creation @@ -205,8 +205,9 @@ class CoreExport Channel : public Extensible, public InviteBase * If the reason field is NULL, no reason will be sent. * @param user The user who is parting (must be on this channel) * @param reason The part reason + * @return True if the user was on the channel and left, false if they weren't and nothing happened */ - void PartUser(User *user, std::string &reason); + bool PartUser(User* user, std::string& reason); /** Join a local user to a channel, with or without permission checks. May be a channel that doesn't exist yet. * @param user The user to join to the channel. @@ -305,12 +306,6 @@ class CoreExport Channel : public Extensible, public InviteBase */ const char* ChanModes(bool showkey); - /** Spool the NAMES list for this channel to the given user - * @param user The user to spool the NAMES list to - * @param isinside If true, the user is inside the channel, if not then false - */ - void UserList(User* user, bool isinside = true); - /** Get the value of a users prefix on this channel. * @param user The user to look up * @return The module or core-defined value of the users prefix. @@ -337,6 +332,11 @@ class CoreExport Channel : public Extensible, public InviteBase /** Get the status of an "action" type extban */ ModResult GetExtBanStatus(User *u, char type); + + /** Write a NOTICE to all local users on the channel + * @param text Text to send + */ + void WriteNotice(const std::string& text); }; inline bool Channel::HasUser(User* user)