diff options
-rw-r--r-- | doc/user-guide/commands.xml | 263 | ||||
-rw-r--r-- | doc/user-guide/help.xsl | 2 | ||||
-rw-r--r-- | protocols/jabber/jabber.c | 7 | ||||
-rw-r--r-- | root_commands.c | 3 |
4 files changed, 177 insertions, 98 deletions
diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index 44a9882f..d28a8531 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -10,7 +10,7 @@ <description> <para> - Available actions: add, del, list, on, off. See <emphasis>help account <action></emphasis> for more information. + Available actions: add, del, list, on, off and set. See <emphasis>help account <action></emphasis> for more information. </para> </description> @@ -25,28 +25,28 @@ </description> <bitlbee-command name="jabber"> - <syntax>account add jabber <handle> <password> [<servertag>]</syntax> + <syntax>account add jabber <handle@server.tld> <password> [<servertag>]</syntax> <description> <para> - Note that the servertag argument is optional. You only have to use it if the part after the @ in your handle isn't the hostname of your Jabber server, or if you want to use SSL/connect to a non-standard port number. The format is simple: [<servername>[:<portnumber>][:ssl]]. For example, this is how you can connect to Google Talk: + Note that the servertag argument is optional. You only have to use it if the part after the @ in your handle isn't the hostname of your Jabber server, or if you want to use SSL/connect to a non-standard port number. The format is simple: [<servername>[:<portnumber>][:ssl]]. </para> </description> - <ircexample> - <ircline nick="wilmer">account add jabber example@gmail.com hobbelmeeuw talk.google.com:5223:ssl</ircline> - <ircline nick="root">Account successfully added</ircline> - </ircexample> - <description> <para> - Note that Google talk is SSL-only, but officially reachable over both port 5222 and 5223. However, for some people only port 5222 works, for some people only 5223. This is something you'll have to try out. + Google Talk uses the Jabber protocol. Please note that Google talk is SSL-only, but officially reachable over both port 5222 and 5223. Usually BitlBee users have to connect via port 5223, for example like this: </para> </description> + + <ircexample> + <ircline nick="wilmer">account add jabber example@gmail.com hobbelmeeuw talk.google.com:5223:ssl</ircline> + <ircline nick="root">Account successfully added</ircline> + </ircexample> </bitlbee-command> <bitlbee-command name="msn"> - <syntax>account add msn <handle> <password></syntax> + <syntax>account add msn <handle@server.tld> <password></syntax> <description> <para> @@ -102,7 +102,7 @@ <description> <para> - This command will try to log into the specified account. If no account is specified, BitlBee will log into all the accounts. (Including accounts awaiting a reconnection) + This command will try to log into the specified account. If no account is specified, BitlBee will log into all the accounts that have the auto_connect flag set. </para> <para> @@ -117,7 +117,7 @@ <description> <para> - This command disconnects the connection for the specified account. If no account is specified, BitlBee will deactivate all active accounts. (Including accounts awaiting a reconnection) + This command disconnects the connection for the specified account. If no account is specified, BitlBee will deactivate all active accounts and cancel all pending reconnects. </para> <para> @@ -135,6 +135,26 @@ </para> </description> </bitlbee-command> + + <bitlbee-command name="set"> + <syntax>account set <account id></syntax> + <syntax>account set <account id>/<setting></syntax> + <syntax>account set <account id>/<setting> <value></syntax> + + <description> + <para> + This account can be used to change various settings for IM accounts. For all protocols, this command can be used to change the handle or the password BitlBee uses to log in and if it should be logged in automatically. Some protocols have additional settings. You can see the settings available for a connection by typing <emphasis>account set <account id></emphasis>. + </para> + + <para> + For more infomation about a setting, see <emphasis>help set <setting></emphasis>. + </para> + + <para> + The account ID can be a number (see <emphasis>account list</emphasis>), the protocol name or (part of) the screenname, as long as it matches only one connection. + </para> + </description> + </bitlbee-command> </bitlbee-command> <bitlbee-command name="add"> @@ -275,120 +295,145 @@ </description> </bitlbee-command> - <bitlbee-setting name="charset" type="string"> - <default>iso8859-1</default> - <possible-values>you can get a list of all possible values by doing 'iconv -l' in a shell</possible-values> + <bitlbee-setting name="auto_connect" type="boolean"> + <default>True</default> <description> <para> - The charset setting enables you to use different character sets in BitlBee. These get converted to UTF-8 before sending and from UTF-8 when receiving. + With this option enabled, when you identify BitlBee will automatically connect to your accounts, with this disabled it will not do this. </para> - + <para> - If you don't know what's the best value for this, at least iso8859-1 is the best choice for most Western countries. You can try to find what works best for you on http://czyborra.com/charsets/iso8859.html + This setting can also be changed for specific accounts using the <emphasis>account set</emphasis> command. (However, these values will be ignored if the global <emphasis>auto_connect</emphasis> setting is disabled!) </para> </description> - </bitlbee-setting> - <bitlbee-setting name="private" type="boolean"> - <default>True</default> + <bitlbee-setting name="auto_reconnect" type="boolean"> + <default>False</default> <description> - <para> - If value is true, messages from users will appear in separate query windows. If false, messages from users will appear in the control channel. + If an IM-connections breaks, you're supposed to bring it back up yourself. Having BitlBee do this automatically might not always be a good idea, for several reasons. If you want the connections to be restored automatically, you can enable this setting. </para> <para> - This setting is remembered (during one session) per-user, this setting only changes the default state. This option takes effect as soon as you reconnect. + See also the <emphasis>auto_reconnect_delay</emphasis> setting. </para> </description> + </bitlbee-setting> - <bitlbee-setting name="save_on_quit" type="boolean"> - <default>True</default> + <bitlbee-setting name="auto_reconnect_delay" type="integer"> + <default>300</default> <description> <para> - If enabled causes BitlBee to save all current settings and account details when user disconnects. This is enabled by default, and these days there's not really a reason to have it disabled anymore. + Tell BitlBee after how many seconds it should attempt to bring an IM-connection back up after a crash. It's not a good idea to set this value very low, it will cause too much useless traffic when an IM-server is down for a few hours. + </para> + + <para> + See also the <emphasis>auto_reconnect</emphasis> setting. </para> </description> </bitlbee-setting> - <bitlbee-setting name="strip_html" type="boolean"> + <bitlbee-setting name="away_devoice" type="boolean"> <default>True</default> <description> <para> - Determines what BitlBee should do with HTML in messages. Normally this is turned on and HTML will be stripped from messages, if BitlBee thinks there is HTML. - </para> - <para> - If BitlBee fails to detect this sometimes (most likely in AIM messages over an ICQ connection), you can set this setting to <emphasis>always</emphasis>, but this might sometimes accidentally strip non-HTML things too. + With this option enabled, the root user devoices people when they go away (just away, not offline) and gives the voice back when they come back. You might dislike the voice-floods you'll get if your contact list is huge, so this option can be disabled. </para> </description> </bitlbee-setting> - <bitlbee-setting name="debug" type="boolean"> + <bitlbee-setting name="buddy_sendbuffer" type="boolean"> <default>False</default> <description> <para> - Some debugging messages can be sent to the control channel if you wish. They're probably not really useful for you, unless you're doing some development on BitlBee. + By default, when you send a message to someone, BitlBee forwards this message to the user immediately. When you paste a large number of lines, the lines will be sent in separate messages, which might not be very nice to read. If you enable this setting, BitlBee will buffer your messages and wait for more data. + </para> + + <para> + Using the <emphasis>buddy_sendbuffer_delay</emphasis> setting you can specify the number of seconds BitlBee should wait for more data before the complete message is sent. + </para> + + <para> + Please note that if you remove a buddy from your list (or if the connection to that user drops) and there's still data in the buffer, this data will be lost. BitlBee will not try to send the message to the user in those cases. </para> </description> </bitlbee-setting> - <bitlbee-setting name="to_char" type="string"> - <default>": "</default> + <bitlbee-setting name="buddy_sendbuffer_delay" type="integer"> + <default>200</default> <description> <para> - It's customary that messages meant for one specific person on an IRC channel are prepended by his/her alias followed by a colon ':'. BitlBee does this by default. If you prefer a different character, you can set it using <emphasis>set to_char</emphasis>. + Tell BitlBee after how many (mili)seconds a buffered message should be sent. Values greater than 5 will be interpreted as miliseconds, 5 and lower as seconds. </para> <para> - Please note that this setting is only used for incoming messages. For outgoing messages you can use ':' (colon) or ',' to separate the destination nick from the message, and this is not configurable. + See also the <emphasis>buddy_sendbuffer</emphasis> setting. </para> </description> </bitlbee-setting> - <bitlbee-setting name="typing_notice" type="boolean"> - <default>False</default> + <bitlbee-setting name="charset" type="string"> + <default>iso8859-1</default> + <possible-values>you can get a list of all possible values by doing 'iconv -l' in a shell</possible-values> <description> <para> - Sends you a /notice when a user starts typing a message (if the protocol supports it, MSN for example). This is a bug, not a feature. (But please don't report it.. ;-) You don't want to use it. Really. In fact the typing-notification is just one of the least useful 'innovations' ever. It's just there because some guy will probably ask me about it anyway. ;-) + The charset setting enables you to use different character sets in BitlBee. These get converted to UTF-8 before sending and from UTF-8 when receiving. + </para> + + <para> + If you don't know what's the best value for this, at least iso8859-1 is the best choice for most Western countries. You can try to find what works best for you on http://czyborra.com/charsets/iso8859.html </para> </description> + </bitlbee-setting> - <bitlbee-setting name="ops" type="string"> - <default>both</default> - <possible-values>both, root, user, none</possible-values> + <bitlbee-setting name="debug" type="boolean"> + <default>False</default> <description> <para> - Some people prefer themself and root to have operator status in &bitlbee, other people don't. You can change these states using this setting. + Some debugging messages can be sent to the control channel if you wish. They're probably not really useful for you, unless you're doing some development on BitlBee. </para> + </description> + </bitlbee-setting> + + <bitlbee-setting name="default_target" type="string"> + <default>root</default> + <possible-values>root, last</possible-values> + <description> <para> - The value "both" means both user and root get ops. "root" means, well, just root. "user" means just the user. "none" means nobody will get operator status. + With this value set to <emphasis>root</emphasis>, lines written in the control channel without any nickname in front of them will be interpreted as commands. If you want BitlBee to send those lines to the last person you addressed in the control channel, set this to <emphasis>last</emphasis>. </para> </description> </bitlbee-setting> - <bitlbee-setting name="away_devoice" type="boolean"> - <default>True</default> - + <bitlbee-setting name="display_name" type="string"> <description> <para> - With this option enabled, the root user devoices people when they go away (just away, not offline) and gives the voice back when they come back. You might dislike the voice-floods you'll get if your contact list is huge, so this option can be disabled. + Currently only available for MSN connections. This setting allows you to read and change your "friendly name" for this connection. Since this is a server-side setting, it can't be changed when the account is off-line. </para> </description> </bitlbee-setting> + <bitlbee-setting name="display_namechanges" type="boolean"> + <default>False</default> + + <para> + With this option enabled, root will inform you when someone in your buddy list changes his/her "friendly name". + </para> + </bitlbee-setting> + <bitlbee-setting name="handle_unknown" type="string"> <default>root</default> <possible-values>root, add, add_private, add_channel, ignore</possible-values> @@ -416,134 +461,158 @@ </bitlbee-setting> - <bitlbee-setting name="auto_connect" type="boolean"> + <bitlbee-setting name="lcnicks" type="boolean"> <default>True</default> <description> <para> - With this option enabled, when you identify BitlBee will automatically connect to your accounts, with this disabled it will not do this. + Hereby you can change whether you want all lower case nick names or leave the case as it intended by your peer. </para> </description> + </bitlbee-setting> - <bitlbee-setting name="auto_reconnect" type="boolean"> - <default>False</default> + <bitlbee-setting name="ops" type="string"> + <default>both</default> + <possible-values>both, root, user, none</possible-values> <description> <para> - If an IM-connections breaks, you're supposed to bring it back up yourself. Having BitlBee do this automatically might not always be a good idea, for several reasons. If you want the connections to be restored automatically, you can enable this setting. + Some people prefer themself and root to have operator status in &bitlbee, other people don't. You can change these states using this setting. </para> <para> - See also the <emphasis>auto_reconnect_delay</emphasis> setting. + The value "both" means both user and root get ops. "root" means, well, just root. "user" means just the user. "none" means nobody will get operator status. </para> </description> - </bitlbee-setting> - <bitlbee-setting name="auto_reconnect_delay" type="integer"> - <default>300</default> - + <bitlbee-setting name="password" type="string"> <description> - <para> - Tell BitlBee after how many seconds it should attempt to bring an IM-connection back up after a crash. It's not a good idea to set this value very low, it will cause too much useless traffic when an IM-server is down for a few hours. + Use this global setting to change your "NickServ" password. </para> - + <para> - See also the <emphasis>auto_reconnect</emphasis> setting. + This setting is also available for all IM accounts to change the password BitlBee uses to connect to the service. + </para> + + <para> + Note that BitlBee will always say this setting is empty. This doesn't mean there is no password, it just means that, for security reasons, BitlBee stores passwords somewhere else so they can't just be retrieved in plain text. </para> </description> </bitlbee-setting> - - <bitlbee-setting name="buddy_sendbuffer" type="boolean"> - <default>False</default> - + + <bitlbee-setting name="port" type="integer"> <description> - <para> - By default, when you send a message to someone, BitlBee forwards this message to the user immediately. When you paste a large number of lines, the lines will be sent in separate messages, which might not be very nice to read. If you enable this setting, BitlBee will buffer your messages and wait for more data. + Currently only available for Jabber connections. Specifies the port number to connect to. Usually this should be set to 5222, or 5223 for SSL-connections. </para> + </description> + </bitlbee-setting> + + <bitlbee-setting name="private" type="boolean"> + <default>True</default> + <description> <para> - Using the <emphasis>buddy_sendbuffer_delay</emphasis> setting you can specify the number of seconds BitlBee should wait for more data before the complete message is sent. + If value is true, messages from users will appear in separate query windows. If false, messages from users will appear in the control channel. </para> <para> - Please note that if you remove a buddy from your list (or if the connection to that user drops) and there's still data in the buffer, this data will be lost. BitlBee will not try to send the message to the user in those cases. + This setting is remembered (during one session) per-user, this setting only changes the default state. This option takes effect as soon as you reconnect. </para> </description> - </bitlbee-setting> - <bitlbee-setting name="buddy_sendbuffer_delay" type="integer"> - <default>200</default> + <bitlbee-setting name="query_order" type="string"> + <default>lifo</default> + <possible-values>lifo, fifo</possible-values> <description> - <para> - Tell BitlBee after how many (mili)seconds a buffered message should be sent. Values greater than 5 will be interpreted as miliseconds, 5 and lower as seconds. + This changes the order in which the questions from root (usually authorization requests from buddies) should be answered. When set to <emphasis>lifo</emphasis>, BitlBee immediately displays all new questions and they should be answered in reverse order. When this is set to <emphasis>fifo</emphasis>, BitlBee displays the first question which comes in and caches all the others until you answer the first one. </para> <para> - See also the <emphasis>buddy_sendbuffer</emphasis> setting. + Although the <emphasis>fifo</emphasis> setting might sound more logical (and used to be the default behaviour in older BitlBee versions), it turned out not to be very convenient for many users when they missed the first question (and never received the next ones). </para> </description> + </bitlbee-setting> + <bitlbee-setting name="resource" type="string"> + <default>BitlBee</default> + + <description> + <para> + Can be set for Jabber connections. You can use this to connect to your Jabber account from multiple clients at once, with every client using a different resource string. + </para> + </description> </bitlbee-setting> - <bitlbee-setting name="default_target" type="string"> - <default>root</default> - <possible-values>root, last</possible-values> + <bitlbee-setting name="save_on_quit" type="boolean"> + <default>True</default> <description> <para> - With this value set to <emphasis>root</emphasis>, lines written in the control channel without any nickname in front of them will be interpreted as commands. If you want BitlBee to send those lines to the last person you addressed in the control channel, set this to <emphasis>last</emphasis>. + If enabled causes BitlBee to save all current settings and account details when user disconnects. This is enabled by default, and these days there's not really a reason to have it disabled anymore. </para> </description> + </bitlbee-setting> + <bitlbee-setting name="server" type="string"> + <description> + <para> + Can be set for Jabber- and OSCAR-connections. For OSCAR, this must be set to <emphasis>login.icq.com</emphasis> if it's an ICQ connection, or <emphasis>login.oscar.aol.com</emphasis> if it's an AIM connection. For Jabber, you have to set this if the servername isn't equal to the part after the @ in the Jabber handle. + </para> + </description> </bitlbee-setting> - <bitlbee-setting name="display_namechanges" type="boolean"> + <bitlbee-setting name="ssl" type="boolean"> <default>False</default> - <para> - With this option enabled, root will inform you when someone in your buddy list changes his/her "friendly name". - </para> + <description> + <para> + Currently only available for Jabber connections. Set this to true if the server accepts SSL connections. + </para> + </description> </bitlbee-setting> - <bitlbee-setting name="password" type="string"> + <bitlbee-setting name="strip_html" type="boolean"> + <default>True</default> + <description> <para> - Use this setting to change your "NickServ" password. + Determines what BitlBee should do with HTML in messages. Normally this is turned on and HTML will be stripped from messages, if BitlBee thinks there is HTML. + </para> + <para> + If BitlBee fails to detect this sometimes (most likely in AIM messages over an ICQ connection), you can set this setting to <emphasis>always</emphasis>, but this might sometimes accidentally strip non-HTML things too. </para> </description> </bitlbee-setting> - <bitlbee-setting name="query_order" type="string"> - <default>lifo</default> - <possible-values>lifo, fifo</possible-values> + <bitlbee-setting name="to_char" type="string"> + <default>": "</default> <description> <para> - This changes the order in which the questions from root (usually authorization requests from buddies) should be answered. When set to <emphasis>lifo</emphasis>, BitlBee immediately displays all new questions and they should be answered in reverse order. When this is set to <emphasis>fifo</emphasis>, BitlBee displays the first question which comes in and caches all the others until you answer the first one. + It's customary that messages meant for one specific person on an IRC channel are prepended by his/her alias followed by a colon ':'. BitlBee does this by default. If you prefer a different character, you can set it using <emphasis>set to_char</emphasis>. </para> <para> - Although the <emphasis>fifo</emphasis> setting might sound more logical (and used to be the default behaviour in older BitlBee versions), it turned out not to be very convenient for many users when they missed the first question (and never received the next ones). + Please note that this setting is only used for incoming messages. For outgoing messages you can use ':' (colon) or ',' to separate the destination nick from the message, and this is not configurable. </para> </description> </bitlbee-setting> - <bitlbee-setting name="lcnicks" type="boolean"> - <default>True</default> + <bitlbee-setting name="typing_notice" type="boolean"> + <default>False</default> <description> <para> - Hereby you can change whether you want all lower case nick names or leave the case as it intended by your peer. + Sends you a /notice when a user starts typing a message (if the protocol supports it, MSN for example). This is a bug, not a feature. (But please don't report it.. ;-) You don't want to use it. Really. In fact the typing-notification is just one of the least useful 'innovations' ever. It's just there because some guy will probably ask me about it anyway. ;-) </para> </description> - </bitlbee-setting> <bitlbee-command name="rename"> diff --git a/doc/user-guide/help.xsl b/doc/user-guide/help.xsl index 0eb1a88b..394530a7 100644 --- a/doc/user-guide/help.xsl +++ b/doc/user-guide/help.xsl @@ -6,7 +6,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"> - <xsl:output method="text" encoding="iso-8859-1" standalone="yes"/> + <xsl:output method="text" encoding="utf-8" standalone="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="text()"> diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 7147a78c..e765a475 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -1548,6 +1548,13 @@ static void jabber_login(account_t *acc) gc = new_gaim_conn(acc); jd = gc->proto_data = g_new0(struct jabber_data, 1); + if( strchr( acc->user, '@' ) == NULL ) + { + hide_login_progress( gc, "Invalid account name" ); + signoff( gc ); + return; + } + resource = set_getstr(&acc->set, "resource"); loginname = create_valid_jid(acc->user, DEFAULT_SERVER, resource); diff --git a/root_commands.c b/root_commands.c index 2cf67134..389266eb 100644 --- a/root_commands.c +++ b/root_commands.c @@ -376,6 +376,7 @@ static void cmd_account( irc_t *irc, char **cmd ) if( a == NULL ) { + g_free( acc_handle ); irc_usermsg( irc, "Invalid account" ); return; } @@ -386,11 +387,13 @@ static void cmd_account( irc_t *irc, char **cmd ) if( a->gc && s && s->flags & ACC_SET_OFFLINE_ONLY ) { + g_free( acc_handle ); irc_usermsg( irc, "This setting can only be changed when the account is %s-line", "off" ); return; } else if( !a->gc && s && s->flags & ACC_SET_ONLINE_ONLY ) { + g_free( acc_handle ); irc_usermsg( irc, "This setting can only be changed when the account is %s-line", "on" ); return; } |