aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-27 05:22:50 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-27 05:22:50 +0100
commitb78c4b9e3f3ec11b4ff560f579da764846793a00 (patch)
treed8c31f431ae525c1151a9e1061092e0be51c1f06
parentea728e661f521405c2883c70865d563750223770 (diff)
parent3f10fad9408844802fcfa3caf3e65e248185f5af (diff)
Merging minor mainline changes.
-rw-r--r--doc/user-guide/commands.xml16
-rw-r--r--irc_commands.c8
-rw-r--r--irc_send.c4
-rw-r--r--root_commands.c6
4 files changed, 24 insertions, 10 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 @@
</description>
</bitlbee-command>
- <bitlbee-command name="transfers">
+ <bitlbee-command name="transfer">
<short-description>Monitor, cancel, or reject file transfers</short-description>
- <syntax>transfers [&lt;cancel&gt; id | &lt;reject&gt;]</syntax>
+ <syntax>transfer [&lt;cancel&gt; id | &lt;reject&gt;]</syntax>
<description>
<para>
- Without parameters the currently pending file transfers and their status will be listed. Available actions are <emphasis>cancel</emphasis> and <emphasis>reject</emphasis>. See <emphasis>help transfers &lt;action&gt;</emphasis> for more information.
+ Without parameters the currently pending file transfers and their status will be listed. Available actions are <emphasis>cancel</emphasis> and <emphasis>reject</emphasis>. See <emphasis>help transfer &lt;action&gt;</emphasis> for more information.
</para>
<ircexample>
- <ircline nick="ulim">transfers</ircline>
+ <ircline nick="ulim">transfer</ircline>
</ircexample>
</description>
<bitlbee-command name="cancel">
<short-description>Cancels the file transfer with the given id</short-description>
- <syntax>transfers &lt;cancel&gt; id</syntax>
+ <syntax>transfer &lt;cancel&gt; id</syntax>
<description>
<para>Cancels the file transfer with the given id</para>
</description>
<ircexample>
- <ircline nick="ulim">transfers cancel 1</ircline>
+ <ircline nick="ulim">transfer cancel 1</ircline>
<ircline nick="root">Canceling file transfer for test</ircline>
</ircexample>
</bitlbee-command>
<bitlbee-command name="reject">
<short-description>Rejects all incoming transfers</short-description>
- <syntax>transfers &lt;reject&gt;</syntax>
+ <syntax>transfer &lt;reject&gt;</syntax>
<description>
<para>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?</para>
</description>
<ircexample>
- <ircline nick="ulim">transfers reject</ircline>
+ <ircline nick="ulim">transfer reject</ircline>
</ircexample>
</bitlbee-command>
</bitlbee-command>
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;
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 },