diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-09 21:48:45 +0100 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2005-12-09 21:48:45 +0100 | 
| commit | 9df916f7d178f5b87e8ca35e3eb44343f3d2d955 (patch) | |
| tree | ce5e73987972e937a13b07adddcba4d6540807b0 /irc.c | |
| parent | c2295f7eeac263dbcc19f84e9a61abbe778aa9f8 (diff) | |
| parent | 87c24bab5738824aba97a824b4c02f7a96b555a0 (diff) | |
Merge my storage abstraction changes
Diffstat (limited to 'irc.c')
| -rw-r--r-- | irc.c | 20 | 
1 files changed, 17 insertions, 3 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);  } @@ -160,7 +160,7 @@ void irc_free(irc_t * irc)  	log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd );  	if( irc->status >= USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )  -		if( !bitlbee_save( irc ) ) +		if( !global.storage->save( irc, TRUE ) )  			irc_usermsg( irc, "Error while saving settings!" );  	if( irc->ping_source_id > 0 ) @@ -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;	 | 
