summaryrefslogtreecommitdiff
path: root/include/channels.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/channels.h')
-rw-r--r--include/channels.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/channels.h b/include/channels.h
index 3baae9f1b..e543370b4 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -35,6 +35,7 @@ struct UserContainer
{
User *user;
UserData *ud;
+ Flags<ChannelModeName> *Status;
UserContainer(User *u) : user(u) { ud = new UserData; }
virtual ~UserContainer() { delete ud; }
@@ -109,6 +110,27 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
*/
void DeleteUser(User *u);
+ /** Check if the user is on the channel
+ * @param u The user
+ * @return A user container if found, else NULL
+ */
+ UserContainer *FindUser(User *u);
+
+ /** Check if a user has a status on a channel
+ * @param u The user
+ * @param cms The status mode, or NULL to represent no status
+ * @return true or false
+ */
+ bool HasUserStatus(User *u, ChannelModeStatus *cms);
+
+ /** Check if a user has a status on a channel
+ * Use the overloaded function for ChannelModeStatus* to check for no status
+ * @param u The user
+ * @param Name The Mode name, eg CMODE_OP, CMODE_VOICE
+ * @return true or false
+ */
+ bool HasUserStatus(User *u, ChannelModeName Name);
+
/** See if the channel has any modes at all
* @return true or false
*/