summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-06 12:52:14 +0000
committerjantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-06 12:52:14 +0000
commit699bee06c3a6e69e44f0e5b91d8e2054685c8213 (patch)
treeef7306a3dbcb64b24b22467a9004bbb2072743b3
parentab337e8de0b72e14135dd614fca947c12e268325 (diff)
Added ability to mark users as either ID'd or UNID'd after user introduction. This is the responsibility of the protocol module!(Required for Insp 1.2)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2534 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/users.c34
-rw-r--r--version.log4
2 files changed, 31 insertions, 7 deletions
diff --git a/src/users.c b/src/users.c
index 0b4960ab3..e8487be4b 100644
--- a/src/users.c
+++ b/src/users.c
@@ -483,7 +483,19 @@ Uid *find_nickuid(const char *uid)
/*************************************************************************/
/* Handle a server NICK command. */
-
+/**
+ * Adds a new user to anopes internal userlist.
+ *
+ * If the SVID passed is 2, the user will not be marked registered or requested to ID.
+ * This is an addition to accomodate IRCds where we cannot determine this based on the NICK
+ * or UID command. Some IRCd's keep +r on when changing nicks and do not use SVID (ex. InspIRCd 1.2).
+ * Instead we get a METADATA command containing the accountname the user was last identified to.
+ * Since this is received after the user is introduced to us we should not yet mark the user
+ * as identified or ask him to identify. We will mark him as recognized for the time being and let
+ * him keep his +r if he has it.
+ * It is the responsibility of the protocol module to make sure that this is either invalidated,
+ * or changed to identified. ~ Viper
+ **/
User *do_nick(const char *source, char *nick, char *username, char *host,
char *server, char *realname, time_t ts, uint32 svid,
uint32 ip, char *vhost, char *uid)
@@ -523,8 +535,8 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
if (LogUsers) {
/**
- * Ugly swap routine for Flop's bug :)
- **/
+ * Ugly swap routine for Flop's bug :)
+ **/
if (realname) {
tmp = strchr(realname, '%');
while (tmp) {
@@ -535,8 +547,8 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
logrealname = normalizeBuffer(realname);
/**
- * End of ugly swap
- **/
+ * End of ugly swap
+ **/
if (ircd->nickvhost) {
if (ircd->nickip) {
@@ -641,7 +653,17 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
display_news(user, NEWS_RANDOM);
}
- if (svid == ts && user->na) {
+ if (svid == 2 && user->na) {
+ /* We do not yet know if the user should be identified or not.
+ * mark him as recognized for now.
+ * It s up to the protocol module to make sure this either becomes ID'd or
+ * is invalidated. ~ Viper */
+ if (debug)
+ alog("debug: Marking %s as recognized..", user->nick);
+ user->svid = 1;
+ user->na->status |= NS_RECOGNIZED;
+ nc_changed = 0;
+ } else if (svid == ts && user->na) {
/* Timestamp and svid match, and nick is registered; automagically identify the nick */
user->svid = svid;
user->na->status |= NS_IDENTIFIED;
diff --git a/version.log b/version.log
index 24b228abe..f106c0f20 100644
--- a/version.log
+++ b/version.log
@@ -9,9 +9,11 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="2"
VERSION_EXTRA="-svn"
-VERSION_BUILD="2525"
+VERSION_BUILD="2534"
# $Log$ # Changes since 1.8.2 Release
+#Revision 2534 - Added ability to mark users as either ID'd or UNID'd after user introduction. This is the responsibility of the protocol module!(Required for Insp 1.2)
+#Revision 2533 - Backport of r2531, reset +r on registered channels after a netmerge when our creation time is newer than what we recieved.
#Revision 2525 - Fix bug #1097. CS FORBID now clears excepts & invites before banning everyone to avoid rejoin floods.
#Revision 2511 - Updated French language file, patch from Saka
#Revision 2495 - Fixed a number of TS6 issues, mainly related to nicks instead of IDs being given to anope_cmd_mode() in combination with a status change (Bug #1096). Also Fixed a small bug in os_oline.