aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-11-24 22:32:12 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-11-24 22:32:12 +0000
commitbedad20a945ef60dbc46e44e5fb26e3b7047490a (patch)
tree7d9bb2c9132feaaa3198a35a8293ef799b839875
parent9564e55a35ebffaad644c13827ec2b795fb21154 (diff)
Some polishing/documentation for the "account add" without password hack.
-rw-r--r--doc/user-guide/commands.xml16
-rw-r--r--irc_commands.c8
-rw-r--r--root_commands.c6
3 files changed, 19 insertions, 11 deletions
diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml
index 2c3b3786..2aa30546 100644
--- a/doc/user-guide/commands.xml
+++ b/doc/user-guide/commands.xml
@@ -16,16 +16,20 @@
</description>
<bitlbee-command name="add">
- <syntax>account add &lt;protocol&gt; &lt;username&gt; &lt;password&gt;</syntax>
+ <syntax>account add &lt;protocol&gt; &lt;username&gt; [&lt;password&gt;]</syntax>
<description>
<para>
Adds an account on the given server with the specified protocol, username and password to the account list. Supported protocols right now are: Jabber, MSN, OSCAR (AIM/ICQ), Yahoo and Twitter. For more information about adding an account, see <emphasis>help account add &lt;protocol&gt;</emphasis>.
</para>
+
+ <para>
+ If you omit the password, you should use the IRC /OPER command to enter it separately. The advantage of this approach is that most IRC clients will not show OPER passwords on screen/save them in logs.
+ </para>
</description>
<bitlbee-command name="jabber">
- <syntax>account add jabber &lt;handle@server.tld&gt; &lt;password&gt;</syntax>
+ <syntax>account add jabber &lt;handle@server.tld&gt; [&lt;password&gt;]</syntax>
<description>
<para>
@@ -39,7 +43,7 @@
</bitlbee-command>
<bitlbee-command name="msn">
- <syntax>account add msn &lt;handle@server.tld&gt; &lt;password&gt;</syntax>
+ <syntax>account add msn &lt;handle@server.tld&gt; [&lt;password&gt;]</syntax>
<description>
<para>
@@ -49,7 +53,7 @@
</bitlbee-command>
<bitlbee-command name="oscar">
- <syntax>account add oscar &lt;handle&gt; &lt;password&gt;</syntax>
+ <syntax>account add oscar &lt;handle&gt; [&lt;password&gt;]</syntax>
<description>
<para>
@@ -64,7 +68,7 @@
</bitlbee-command>
<bitlbee-command name="twitter">
- <syntax>account add twitter &lt;handle&gt; &lt;password&gt;</syntax>
+ <syntax>account add twitter &lt;handle&gt; [&lt;password&gt;]</syntax>
<description>
<para>
@@ -86,7 +90,7 @@
</bitlbee-command>
<bitlbee-command name="yahoo">
- <syntax>account add yahoo &lt;handle&gt; &lt;password&gt;</syntax>
+ <syntax>account add yahoo &lt;handle&gt; [&lt;password&gt;]</syntax>
<description>
<para>
diff --git a/irc_commands.c b/irc_commands.c
index 3b561d00..a183ec35 100644
--- a/irc_commands.c
+++ b/irc_commands.c
@@ -408,6 +408,12 @@ static void irc_cmd_oper( irc_t *irc, char **cmd )
if( strcmp( a->pass, PASSWORD_PENDING ) == 0 )
{
set_setstr( &a->set, "password", cmd[2] );
+ irc_usermsg( irc, "Password added to IM account "
+ "%s(%s)", a->prpl->name, a->user );
+ /* The IRC client may expect this. Report failure since
+ we didn't hand out a +o. */
+ irc_send_num( irc, 491, ":Password added to IM account "
+ "%s(%s)", a->prpl->name, a->user );
return;
}
@@ -421,7 +427,7 @@ static void irc_cmd_oper( irc_t *irc, char **cmd )
}
else
{
- irc_send_num( irc, 432, ":Incorrect password" );
+ irc_send_num( irc, 491, ":Incorrect password" );
}
}
diff --git a/root_commands.c b/root_commands.c
index 01313b1c..207f9678 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -426,10 +426,8 @@ static void cmd_account( irc_t *irc, char **cmd )
set_setstr( &a->set, "server", cmd[5] );
}
- irc_usermsg( irc, "Account successfully added" );
-
- if( cmd[4] == NULL )
- irc_usermsg( irc, "Now, use /OPER to enter your password for this account" );
+ irc_usermsg( irc, "Account successfully added%s", cmd[4] ? "" :
+ ", now use /OPER to enter the password" );
return;
}