aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-10-22 01:50:34 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-10-22 01:50:34 +0100
commit8d93b4ad430af75e8ca50116cf7a8ddd19084649 (patch)
treea5d0edd85c09c76ce517a1216e5ec0bc4003be3f /root_commands.c
parent7c5a3be5eacf151d52266e2bc12ccdd8ed8cdb9f (diff)
Oops. Just in time I noticed the whatsnew code doesn't kick in for pre-1.33.0
accounts. Fixed now.
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/root_commands.c b/root_commands.c
index 98105832..81e33076 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -205,6 +205,8 @@ gboolean cmd_identify_finish( gpointer data, gint fd, b_input_condition cond )
static void cmd_register( irc_t *irc, char **cmd )
{
+ char s[16];
+
if( global.conf->authmode == AUTHMODE_REGISTERED )
{
irc_usermsg( irc, "This server does not allow registering new accounts" );
@@ -221,6 +223,12 @@ static void cmd_register( irc_t *irc, char **cmd )
irc_setpass( irc, cmd[1] );
irc->status |= USTATUS_IDENTIFIED;
irc_umode_set( irc, "+R", 1 );
+
+ /* Set this var now, or anyone who logs in to his/her
+ newly created account for the first time gets the
+ whatsnew story. */
+ g_snprintf( s, sizeof( s ), "%d", BITLBEE_VERSION_CODE );
+ set_setstr( &irc->b->set, "last_version", s );
break;
default: