summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/account.h2
-rw-r--r--include/extern.h1
-rw-r--r--include/users.h22
3 files changed, 22 insertions, 3 deletions
diff --git a/include/account.h b/include/account.h
index 02e6508d4..3f39c3b4a 100644
--- a/include/account.h
+++ b/include/account.h
@@ -122,6 +122,8 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag>
NickCore *next, *prev;
+ std::list<User *> Users;
+
char *display; /* How the nick is displayed */
std::string pass; /* Password of the nicks */
char *email; /* E-mail associated to the nick */
diff --git a/include/extern.h b/include/extern.h
index 6c147897a..a4ed84ac1 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -385,7 +385,6 @@ E void ns_init();
E void nickserv(User * u, char *buf);
E int validate_user(User * u);
E void cancel_user(User * u);
-E int nick_identified(User * u);
E void expire_nicks();
E void expire_requests();
EI int ns_do_register(User * u);
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
*/