aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-03-29 22:19:17 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2008-03-29 22:19:17 +0000
commita199d33ed818820ffba328f718799bbd77392f6a (patch)
treed01fe78e41871dd73f35dfe4e87d91cfc54f466e /irc.c
parent89681335303b1118eda246c901f3c99470de19fc (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.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/irc.c b/irc.c
index 3589256e..fa0c03fe 100644
--- a/irc.c
+++ b/irc.c
@@ -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 )