diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-01-14 20:12:48 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-01-14 20:12:48 +0100 |
commit | b23c5c758097e7c7e9e0141ba9467177c0c32114 (patch) | |
tree | a4e1ce024c5ad5836d94d5746e42879396800f88 /irc_commands.c | |
parent | edf965753380a165ec615b79d45251931ac3ea62 (diff) |
Added correct responses for OPER command, stripped some unnecessary periods.
Diffstat (limited to 'irc_commands.c')
-rw-r--r-- | irc_commands.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/irc_commands.c b/irc_commands.c index 696c45d4..81b3d60b 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -35,7 +35,7 @@ static int irc_cmd_pass( irc_t *irc, char **cmd ) } else { - irc_reply( irc, 464, ":Incorrect password." ); + irc_reply( irc, 464, ":Incorrect password" ); } return( 1 ); @@ -95,9 +95,14 @@ static int irc_cmd_ping( irc_t *irc, char **cmd ) static int irc_cmd_oper( irc_t *irc, char **cmd ) { if( global.conf->oper_pass && strcmp( cmd[2], global.conf->oper_pass ) == 0 ) + { irc_umode_set( irc, "+o", 1 ); - // else - /* FIXME/TODO: Find out which reply to send now. */ + irc_reply( irc, 381, ":Password accepted" ); + } + else + { + irc_reply( irc, 432, ":Incorrect password" ); + } return( 1 ); } @@ -310,7 +315,7 @@ static int irc_cmd_who( irc_t *irc, char **cmd ) else if( ( u = user_find( irc, channel ) ) ) irc_reply( irc, 352, "%s %s %s %s %s %c :0 %s", channel, u->user, u->host, irc->myhost, u->nick, u->online ? ( u->away ? 'G' : 'H' ) : 'G', u->realname ); - irc_reply( irc, 315, "%s :End of /WHO list.", channel?channel:"**" ); + irc_reply( irc, 315, "%s :End of /WHO list", channel?channel:"**" ); return( 1 ); } |