diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-08 17:00:08 +0100 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2005-12-08 17:00:08 +0100 | 
| commit | 7cad7b41a0b661c38ae5f6239aaf58361788edc9 (patch) | |
| tree | 213ab238ece2ab120b7ec25f62b19224b37d6856 /irc.c | |
| parent | 09adf08684c62fff0f507304ed37680137de4637 (diff) | |
Clearer seperation between crypting and generic password code
Diffstat (limited to 'irc.c')
| -rw-r--r-- | irc.c | 18 | 
1 files changed, 16 insertions, 2 deletions
| @@ -31,9 +31,9 @@ static gboolean irc_userping( gpointer _irc );  GSList *irc_connection_list = NULL; -char *passchange (irc_t *irc, void *set, char *value)  +static char *passchange (irc_t *irc, void *set, char *value)   { -	setpassnc (irc, value); +	irc_setpass (irc, value);  	return (NULL);  } @@ -267,6 +267,20 @@ void irc_free(irc_t * irc)  		g_main_quit( global.loop );  } +/* USE WITH CAUTION! +   Sets pass without checking */ +void irc_setpass (irc_t *irc, const char *pass)  +{ +	if (irc->password) g_free (irc->password); +	 +	if (pass) { +		irc->password = g_strdup (pass); +		irc_usermsg (irc, "Password successfully changed"); +	} else { +		irc->password = NULL; +	} +} +  int irc_process( irc_t *irc )  {  	char **lines, *temp;	 | 
