1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 09:03:13 +02:00

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
This commit is contained in:
jantje_85
2009-10-06 12:52:14 +00:00
parent ab337e8de0
commit 699bee06c3
2 changed files with 31 additions and 7 deletions
+28 -6
View File
@@ -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;
+3 -1
View File
@@ -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.