summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-21 06:31:17 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-21 06:31:17 +0000
commit0ed0fa4af62554a7281d403b6895b29e198e8186 (patch)
tree4b0509084ef8181790f19c258c3bc1f5e38b80cc /include/users.h
parent15817208aae1c80e2b03668981ac9268d6a02dde (diff)
Rewrote how Anope stores channel status modes on users.
This allows 3rd party modules to add and track their own status mode. Additionally we now store a users status in both the UserContainer and ChannelContainer. This also fixes the ModeStacker to not send any mode strings unnecessarially and shuffles some code around so we don't have to manually remove channels from users lists everywhere. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2775 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/users.h b/include/users.h
index 03dad2e55..c5b67ab4c 100644
--- a/include/users.h
+++ b/include/users.h
@@ -12,9 +12,9 @@
struct ChannelContainer
{
Channel *chan;
- int16 status;
+ Flags<ChannelModeName> *Status;
- ChannelContainer(Channel *c) : chan(c) { status = 0; }
+ ChannelContainer(Channel *c) : chan(c) { }
virtual ~ChannelContainer() { }
};
@@ -222,5 +222,13 @@ class CoreExport User : public Extensible
* @param modes The modes
*/
void SetModes(BotInfo *bi, const char *modes, ...);
+
+ /** Find the channel container for Channel c that the user is on
+ * This is preferred over using FindUser in Channel, as there are usually more users in a channel
+ * than channels a user is in
+ * @param c The channel
+ * @return The channel container, or NULL
+ */
+ ChannelContainer *FindChannel(Channel *c);
};