diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-13 21:26:38 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-13 21:26:38 +0000 |
| commit | d3d64c27b199622c90075d6f59dd08e44acbb378 (patch) | |
| tree | 68029e10dc754271235e2a4e3d04b3fb19ddd15c /include/users.h | |
| parent | 1fd66851320e239b531720c27614a5ad4c604c97 (diff) | |
Complete rewrite of everything associated with modes, this breaks saving and reading mlocked modes from the databases until the new databases are implemented
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2560 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/users.h')
| -rw-r--r-- | include/users.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h index 1f7f617d3..f54be8982 100644 --- a/include/users.h +++ b/include/users.h @@ -8,6 +8,7 @@ * $Id$ * */ + struct u_chanlist { struct u_chanlist *next, *prev; Channel *chan; @@ -41,7 +42,7 @@ class CoreExport User : public Extensible Server *server; /* Server user is connected to */ time_t timestamp; /* Timestamp of the nick */ time_t my_signon; /* When did _we_ see the user? */ - uint32 mode; /* See below */ + std::bitset<128> modes; NickCore *nc; @@ -161,5 +162,31 @@ class CoreExport User : public Extensible /** Update the last usermask stored for a user, and check to see if they are recognized */ void UpdateHost(); + + /** Check if the user has a mode + * @param Name Mode name + * @return true or false + */ + const bool HasMode(UserModeName Name) const; + + /** Set a mode on the user + * @param Name The mode name + */ + void SetMode(UserModeName Name); + + /* Set a mode on the user + * @param ModeChar The mode char + */ + void SetMode(char ModeChar); + + /** Remove a mode from the user + * @param Name The mode name + */ + void RemoveMode(UserModeName Name); + + /** Remove a mode from the user + * @param ModeChar The mode char + */ + void RemoveMode(char ModeChar); }; |
