aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/irc.c b/irc.c
index 5f69b2ea..f6e7cbb7 100644
--- a/irc.c
+++ b/irc.c
@@ -32,10 +32,11 @@ static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond );
GSList *irc_connection_list = NULL;
-static char *passchange (irc_t *irc, void *set, char *value)
+static char *passchange( irc_t *irc, void *set, char *value )
{
- irc_setpass (irc, value);
- return (NULL);
+ irc_setpass( irc, value );
+ irc_usermsg( irc, "Password successfully changed" );
+ return NULL;
}
irc_t *irc_new( int fd )
@@ -328,11 +329,10 @@ void irc_free(irc_t * irc)
Sets pass without checking */
void irc_setpass (irc_t *irc, const char *pass)
{
- if (irc->password) g_free (irc->password);
+ g_free (irc->password);
if (pass) {
irc->password = g_strdup (pass);
- irc_usermsg (irc, "Password successfully changed");
} else {
irc->password = NULL;
}