summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-02-04 23:49:27 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-02-04 23:49:27 +0000
commit308070e01971b0cfaf77de20011f48ce4d6b5a1c (patch)
tree2bdfd84e35cf79eb20dc2a79ddd233789ca84fdf /include/users.h
parent3d4cf39940144be19645a3a7cdecf95213b96f26 (diff)
We now store a list of users using a NickCore in the NickCore, this prevents having to loop every user all the time to find them
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2780 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/include/users.h b/include/users.h
index dba200770..525df393b 100644
--- a/include/users.h
+++ b/include/users.h
@@ -30,6 +30,7 @@ class CoreExport User : public Extensible
bool OnAccess; /* If the user is on the access list of the nick theyre on */
std::bitset<128> modes; /* Bitset of mode names the user has set on them */
std::map<UserModeName, std::string> Params; /* Map of user modes and the params this user has */
+ NickCore *nc; /* NickCore account the user is currently loggged in as */
public: // XXX: exposing a tiny bit too much
User *next, *prev;
@@ -45,8 +46,6 @@ class CoreExport User : public Extensible
time_t timestamp; /* Timestamp of the nick */
time_t my_signon; /* When did _we_ see the user? */
- NickCore *nc;
-
int isSuperAdmin; /* is SuperAdmin on or off? */
/* Channels the user is in */
@@ -155,6 +154,25 @@ class CoreExport User : public Extensible
*/
void AutoID(const char *acc);
+ /** Login the user to a NickCore
+ * @param core The account the user is useing
+ */
+ void Login(NickCore *core);
+
+ /** Logout the user
+ */
+ void Logout();
+
+ /** Get the account the user is logged in using
+ * @reurn The account or NULL
+ */
+ NickCore *Account() const;
+
+ /** Check if the user is identified for their nick
+ * @return true or false
+ */
+ const bool IsIdentified() const;
+
/** Check if the user is recognized for their nick (on the nicks access list)
* @return true or false
*/