From a72af0dc9b76451f5aa57ac9443267a97c794f95 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 25 Aug 2010 01:18:27 +0100 Subject: Fix /WHO on single nicks. --- irc_commands.c | 8 ++++++++ irc_send.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/irc_commands.c b/irc_commands.c index 4b1bc741..7874f519 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -301,11 +301,19 @@ static void irc_cmd_who( irc_t *irc, char **cmd ) { char *channel = cmd[1]; irc_channel_t *ic; + irc_user_t *iu; if( !channel || *channel == '0' || *channel == '*' || !*channel ) irc_send_who( irc, irc->users, "**" ); else if( ( ic = irc_channel_by_name( irc, channel ) ) ) irc_send_who( irc, ic->users, channel ); + else if( ( iu = irc_user_by_name( irc, channel ) ) ) + { + /* Tiny hack! */ + GSList *l = g_slist_append( NULL, iu ); + irc_send_who( irc, l, channel ); + g_slist_free( l ); + } else irc_send_num( irc, 403, "%s :No such channel", channel ); } diff --git a/irc_send.c b/irc_send.c index 76b54dd1..fa4e6815 100644 --- a/irc_send.c +++ b/irc_send.c @@ -263,7 +263,7 @@ void irc_send_whois( irc_user_t *iu ) void irc_send_who( irc_t *irc, GSList *l, const char *channel ) { - gboolean is_channel = strcmp( channel, "**" ) != 0; + gboolean is_channel = strchr( CTYPES, channel[0] ) != NULL; while( l ) { @@ -272,7 +272,7 @@ void irc_send_who( irc_t *irc, GSList *l, const char *channel ) iu = ((irc_channel_user_t*)iu)->iu; /* TODO(wilmer): Restore away/channel information here */ irc_send_num( irc, 352, "%s %s %s %s %s %c :0 %s", - channel ? : "*", iu->user, iu->host, irc->root->host, + is_channel ? channel : "*", iu->user, iu->host, irc->root->host, iu->nick, iu->flags & IRC_USER_AWAY ? 'G' : 'H', iu->fullname ); l = l->next; -- cgit v1.2.3 From 3cd4016e8580b82bebac59e9a23c8de96330ac64 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 25 Aug 2010 22:35:49 +0100 Subject: I guess the nick command was never deprecated clearly, so let's do that now. --- root_commands.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/root_commands.c b/root_commands.c index 280c93a2..94d22933 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1283,6 +1283,11 @@ static void cmd_transfer( irc_t *irc, char **cmd ) } } +static void cmd_nick( irc_t *irc, char **cmd ) +{ + irc_usermsg( irc, "This command is deprecated. Try: account %s set display_name", cmd[1] ); +} + /* Maybe this should be a stand-alone command as well? */ static void bitlbee_whatsnew( irc_t *irc ) { @@ -1337,6 +1342,7 @@ const command_t commands[] = { { "help", 0, cmd_help, 0 }, { "identify", 1, cmd_identify, 0 }, { "info", 1, cmd_info, 0 }, + { "nick", 1, cmd_nick, 0 }, { "no", 0, cmd_yesno, 0 }, { "qlist", 0, cmd_qlist, 0 }, { "register", 1, cmd_register, 0 }, -- cgit v1.2.3 From 3f10fad9408844802fcfa3caf3e65e248185f5af Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 25 Aug 2010 22:37:57 +0100 Subject: The "transfers" command was renamed to "transfer" but this wasn't reflected in the docs so far. --- doc/user-guide/commands.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index 989fc392..a1554645 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -1463,44 +1463,44 @@ - + Monitor, cancel, or reject file transfers - transfers [<cancel> id | <reject>] + transfer [<cancel> id | <reject>] - Without parameters the currently pending file transfers and their status will be listed. Available actions are cancel and reject. See help transfers <action> for more information. + Without parameters the currently pending file transfers and their status will be listed. Available actions are cancel and reject. See help transfer <action> for more information. - transfers + transfer Cancels the file transfer with the given id - transfers <cancel> id + transfer <cancel> id Cancels the file transfer with the given id - transfers cancel 1 + transfer cancel 1 Canceling file transfer for test Rejects all incoming transfers - transfers <reject> + transfer <reject> Rejects all incoming (not already transferring) file transfers. Since you probably have only one incoming transfer at a time, no id is neccessary. Or is it? - transfers reject + transfer reject -- cgit v1.2.3