summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/users.h b/include/users.h
index 80bf33114..03dad2e55 100644
--- a/include/users.h
+++ b/include/users.h
@@ -9,12 +9,17 @@
*
*/
-struct u_chanlist {
- struct u_chanlist *next, *prev;
+struct ChannelContainer
+{
Channel *chan;
- int16 status; /* Associated flags; see CSTATUS_* below. */
+ int16 status;
+
+ ChannelContainer(Channel *c) : chan(c) { status = 0; }
+ virtual ~ChannelContainer() { }
};
+typedef std::list<ChannelContainer *> UChannelList;
+
/* Online user and channel data. */
class CoreExport User : public Extensible
{
@@ -44,7 +49,8 @@ class CoreExport User : public Extensible
int isSuperAdmin; /* is SuperAdmin on or off? */
- struct u_chanlist *chans; /* Channels user has joined */
+ /* Channels the user is in */
+ UChannelList chans;
unsigned short invalid_pw_count; /* # of invalid password attempts */
time_t invalid_pw_time; /* Time of last invalid password */