diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-03-29 22:19:17 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-03-29 22:19:17 +0000 |
commit | a199d33ed818820ffba328f718799bbd77392f6a (patch) | |
tree | d01fe78e41871dd73f35dfe4e87d91cfc54f466e /irc.c | |
parent | 89681335303b1118eda246c901f3c99470de19fc (diff) |
Closing bug #209: The PASS command can now be used to identify yourself
to BitlBee. The advantage: No more messing with NickServ hooks. Just set
a server password.
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -735,12 +735,27 @@ void irc_login( irc_t *irc ) u->online = 1; irc_spawn( irc, u ); - irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\nIf you've never used BitlBee before, please do read the help information using the \x02help\x02 command. Lots of FAQs are answered there." ); + irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\n" + "If you've never used BitlBee before, please do read the help " + "information using the \x02help\x02 command. Lots of FAQs are " + "answered there.\n" + "If you already have an account on this server, just use the " + "\x02identify\x02 command to identify yourself." ); if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON ) ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname ); 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] ); + } } void irc_motd( irc_t *irc ) |