diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-07 16:45:42 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-07 16:45:42 +0100 | 
| commit | 70f69ecc5f80f060d1780110ed9792f9e19d2507 (patch) | |
| tree | 36ad1e6c7e802096bc0a8156a15e39fe99abdeeb | |
| parent | c5aefa4463135b3f8720785804fe183817829b00 (diff) | |
Restoring auto-identification using server password.
| -rw-r--r-- | irc.c | 20 | ||||
| -rw-r--r-- | irc_commands.c | 2 | 
2 files changed, 11 insertions, 11 deletions
| @@ -643,16 +643,6 @@ int irc_check_login( irc_t *irc )  			irc->status |= USTATUS_LOGGED_IN; -			/* This is for bug #209 (use PASS to identify to NickServ). */ -			if( irc->password != NULL ) -			{ -				char *send_cmd[] = { "identify", g_strdup( irc->password ), NULL }; -				 -				/*irc_setpass( irc, NULL );*/ -				/*root_command( irc, send_cmd );*/ -				g_free( send_cmd[1] ); -			} -			  			irc_send_login( irc );  			irc->umode[0] = '\0'; @@ -672,6 +662,16 @@ int irc_check_login( irc_t *irc )  			              "If you already have an account on this server, just use the "  			              "\x02identify\x02 command to identify yourself.", NULL ); +			/* This is for bug #209 (use PASS to identify to NickServ). */ +			if( irc->password != NULL ) +			{ +				char *send_cmd[] = { "identify", g_strdup( irc->password ), NULL }; +				 +				irc_setpass( irc, NULL ); +				root_command( irc, send_cmd ); +				g_free( send_cmd[1] ); +			} +			  			return 1;  		}  	} diff --git a/irc_commands.c b/irc_commands.c index 4ce68f07..6c425dee 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -57,7 +57,7 @@ static void irc_cmd_pass( irc_t *irc, char **cmd )  	else  	{  		/* Remember the password and try to identify after USER/NICK. */ -		/*irc_setpass( irc, cmd[1] ); */ +		irc_setpass( irc, cmd[1] );  		irc_check_login( irc );  	}  } | 
