+
+ /** Add a prefix character to a user.
+ * Only the core should call this method, usually from
+ * within the mode parser or when the first user joins
+ * the channel (to grant the default privs to them)
+ * @param mh The mode handler of the prefix mode to associate
+ * @param adding True if adding the prefix, false when removing
+ * @return True if a change was made
+ */
+ bool SetPrefix(PrefixMode* mh, bool adding);
+
+ /** Get the highest prefix this user has on the channel
+ * @return A character containing the highest prefix.
+ * If the user has no prefix, 0 is returned. If the user has multiple prefixes,
+ * the highest is returned. If you do not recognise the prefix character you
+ * can get, you can deal with it in a 'proportional' manner compared to known
+ * prefixes, using GetPrefixValue().
+ */
+ char GetPrefixChar() const;
+
+ /** Return all prefix chars this member has.
+ * @return A list of all prefix characters. The prefixes will always
+ * be in rank order, greatest first, as certain IRC clients require
+ * this when multiple prefixes are used names lists.
+ */
+ const char* GetAllPrefixChars() const;
+};
+
+template <typename T>
+class InviteBase
+{
+ protected:
+ /** List of pending Invitations
+ */
+ intrusive_list<Invitation, T> invites;
+
+ public:
+ /** Remove and destruct all pending invitations this user or channel has.
+ * Must be called before the object is destroyed, also called when the TS of the channel is lowered.
+ */
+ void ClearInvites();
+
+ friend class Invitation;