diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-09-30 21:50:32 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-09-30 21:50:32 +0000 |
| commit | 85b409df8577e2433724a056564ab62ff72c4c89 (patch) | |
| tree | 8c94aef81664a17ecff3e7fabc5ccdd29c6749f6 /include | |
| parent | 383629d7185f23f8a365cf56f6d28c8fdc5d15e3 (diff) | |
Removed NS_IDENTIFIED/NS_RECOGNIZED/NS_ON_ACCESS from na->status, it doesnt belong there anymore and doesnt work. Replaced nick_recognized() with User::IsRecognized() which returns if youre recognized for the nick you are on, not necessarially the account youre logged in for.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2523 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
| -rw-r--r-- | include/extern.h | 5 | ||||
| -rw-r--r-- | include/services.h | 6 | ||||
| -rw-r--r-- | include/users.h | 13 |
3 files changed, 16 insertions, 8 deletions
diff --git a/include/extern.h b/include/extern.h index 366396682..8a767ba39 100644 --- a/include/extern.h +++ b/include/extern.h @@ -716,7 +716,6 @@ E void save_ns_req_dbase(); E int validate_user(User * u); E void cancel_user(User * u); E int nick_identified(User * u); -E int nick_recognized(User * u); E void expire_nicks(); E void expire_requests(); EI int ns_do_register(User * u); @@ -724,7 +723,7 @@ E int delnick(NickAlias * na); E NickAlias *findnick(const char *nick); E NickAlias *findnick(const std::string &nick); E NickCore *findcore(const char *nick); -E int is_on_access(User * u, NickCore * nc); +E bool is_on_access(User *u, NickCore *nc); /** Set the correct oper type for a nickcore * @param nc The nick core @@ -905,8 +904,6 @@ E Server *findserver_uid(Server * s, const char *name); E char *TS6SID; E char *TS6UPLINK; -E void update_host(User * user); - E User *do_nick(const char *source, const char *nick, const char *username, const char *host, const char *server, const char *realname, time_t ts, uint32 ip, const char *vhost, const char *uid); diff --git a/include/services.h b/include/services.h index 0119929fc..758c766e3 100644 --- a/include/services.h +++ b/include/services.h @@ -1102,9 +1102,9 @@ typedef struct ircd_modes_ { /* Nickname status flags: */ #define NS_FORBIDDEN 0x0002 /* Nick may not be registered or used */ #define NS_NO_EXPIRE 0x0004 /* Nick never expires */ -#define NS_IDENTIFIED 0x8000 /* User has IDENTIFY'd */ -#define NS_RECOGNIZED 0x4000 /* ON_ACCESS true && SECURE flag not set */ -#define NS_ON_ACCESS 0x2000 /* User comes from a known address */ +//#define NS_IDENTIFIED 0x8000 /* User has IDENTIFY'd */ +//#define NS_RECOGNIZED 0x4000 /* ON_ACCESS true && SECURE flag not set */ +//#define NS_ON_ACCESS 0x2000 /* User comes from a known address */ #define NS_KILL_HELD 0x1000 /* Nick is being held after a kill */ #define NS_GUESTED 0x0100 /* SVSNICK has been sent but nick has not * yet changed. An enforcer will be diff --git a/include/users.h b/include/users.h index a3d182546..1f7f617d3 100644 --- a/include/users.h +++ b/include/users.h @@ -26,7 +26,9 @@ class CoreExport User : public Extensible std::string vident; std::string ident; std::string uid; -public: // XXX: exposing a tiny bit too much + bool OnAccess; /* If the user is on the access list of the nick theyre on */ + + public: // XXX: exposing a tiny bit too much User *next, *prev; char nick[NICKMAX]; @@ -150,5 +152,14 @@ public: // XXX: exposing a tiny bit too much * @param account Display nick of account */ void AutoID(const char *acc); + + /** Check if the user is recognized for their nick (on the nicks access list) + * @return true or false + */ + const bool IsRecognized() const; + + /** Update the last usermask stored for a user, and check to see if they are recognized + */ + void UpdateHost(); }; |
