diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-09 21:01:05 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-09 21:01:05 +0000 |
| commit | d7d01bdc5c667a1fafd95241282b58e03b4caa5b (patch) | |
| tree | f1482d8734da609923c6d8af6bc8fcb0fc187534 /include/users.h | |
| parent | d49b3a25fda5f597491e73640dd1e76babc240eb (diff) | |
Squashed commit: merge next (1.9.1) back to trunk.
SVN users, NOTE: THIS WILL NOT BUILD, NOR SHOULD YOU RUN IT YET.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1953 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/users.h')
| -rw-r--r-- | include/users.h | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/include/users.h b/include/users.h index 9c0c85824..a8ab1b9e8 100644 --- a/include/users.h +++ b/include/users.h @@ -22,17 +22,19 @@ struct u_chaninfolist { /* Online user and channel data. */ class CoreExport User : public Extensible { - public: // XXX: exposing a tiny bit too much + private: + std::string vident; + std::string ident; + std::string uid; +public: // XXX: exposing a tiny bit too much User *next, *prev; char nick[NICKMAX]; - char *username; /* ident */ char *host; /* User's real hostname */ char *hostip; /* User's IP number */ char *vhost; /* User's virtual hostname */ std::string chost; /* User's cloaked hostname */ - char *vident; /* User's virtual ident */ char *realname; /* Realname */ Server *server; /* Server user is connected to */ char *nickTrack; /* Nick Tracking */ @@ -40,7 +42,6 @@ class CoreExport User : public Extensible time_t my_signon; /* When did _we_ see the user? */ time_t svid; /* Services ID */ uint32 mode; /* See below */ - char *uid; /* Univeral ID */ NickAlias *na; @@ -62,14 +63,16 @@ class CoreExport User : public Extensible /** Create a new user object, initialising necessary fields and * adds it to the hash * - * @parameter nick The nickname of the user account. + * @param nick The nickname of the user. + * @param uid The unique identifier of the user. */ - User(const std::string &nick); + User(const std::string &nick, const std::string &uid); /** Destroy a user. */ ~User(); + /** Update the nickname of a user record accordingly, should be * called from ircd protocol. */ @@ -77,13 +80,48 @@ class CoreExport User : public Extensible /** Update the displayed (vhost) of a user record. * This is used (if set) instead of real host. + * @param host The new displayed host to give the user. */ void SetDisplayedHost(const std::string &host); + /** Get the displayed vhost of a user record. + * @return The displayed vhost of the user, where ircd-supported, or the user's real host. + */ + const std::string GetDisplayedHost() const; + + + /** Retrieves the UID of the user, where applicable, if set. + * This is not used on some IRCds, but is for a lot e.g. P10, TS6 protocols. + * @return The UID of the user. + */ + const std::string &GetUID() const; + + /** Update the displayed ident (username) of a user record. + * @param ident The new ident to give this user. + */ + void SetVIdent(const std::string &ident); + + /** Get the displayed ident (username) of this user. + * @return The displayed ident of this user. + */ + const std::string &GetVIdent() const; + + /** Update the real ident (username) of a user record. + * @param ident The new ident to give this user. + * NOTE: Where possible, you should use the Get/SetVIdent() equivilants. */ void SetIdent(const std::string &ident); + /** Get the real ident (username) of this user. + * @return The displayed ident of this user. + * NOTE: Where possible, you should use the Get/SetVIdent() equivilants. + */ + const std::string &GetIdent() const; + + + + /** Updates the realname of the user record. */ void SetRealname(const std::string &realname); |
