Index: doc/user-guide/commands.xml
===================================================================
--- doc/user-guide/commands.xml	(revision 1195cecc99315c9c38e05c8dd0981792e7663583)
+++ doc/user-guide/commands.xml	(revision 286b28eabf39d98d642c73c34a16a599e61dfc99)
@@ -125,5 +125,5 @@
 			<description>
 				<para>
-					This command gives you a list of all the accounts known by BitlBee, including the numbers you'll need for most account commands.
+					This command gives you a list of all the accounts known by BitlBee.
 				</para>
 			</description>
@@ -138,13 +138,100 @@
 			<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 &lt;account id&gt;</emphasis>.
+					This command 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 &lt;account id&gt;</emphasis>.
 				</para>
 				
 				<para>
-					For more infomation about a setting, see <emphasis>help set &lt;setting&gt;</emphasis>. For details about the syntax of this command, see <emphasis>help set</emphasis>.
+					For more infomation about a setting, see <emphasis>help set &lt;setting&gt;</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="chat">
+		<short-description>Chatroom list maintenance</short-description>
+		<syntax>chat &lt;action&gt; [&lt;arguments&gt;]</syntax>
+
+		<description>
+
+			<para>
+				Available actions: add, del, list, with and set. See <emphasis>help chat &lt;action&gt;</emphasis> for more information.
+			</para>
+
+		</description>
+
+		<bitlbee-command name="add">
+			<syntax>chat add &lt;account&gt; &lt;room&gt; [&lt;channel&gt;]</syntax>
+
+			<description>
+				<para>
+					Add a chatroom to the list of chatrooms you're interested in. BitlBee needs this list to map room names to a proper IRC channel name.
+				</para>
+
+				<para>
+					After adding a room to your list, you can simply use the IRC /join command to enter the room. Also, you can tell BitlBee to automatically join the room when you log in. (See <emphasis>chat set</emphasis>)
+				</para>
+
+				<para>
+					Password-protected rooms work exactly like on IRC, by passing the password as an extra argument to /join.
+				</para>
+			</description>
+
+		</bitlbee-command>
+
+		<bitlbee-command name="del">
+			<syntax>chat del &lt;chat id&gt;</syntax>
+
+			<description>
+				<para>
+					This commands deletes an chatroom from your list.
+				</para>
+
+				<para>
+					The room ID can be a number (see <emphasis>chat list</emphasis>), or (part of) the name of the room/channel.
+				</para>
+			</description>
+		</bitlbee-command>
+
+		<bitlbee-command name="list">
+			<syntax>chat list</syntax>
+
+			<description>
+				<para>
+					This command gives you a list of all the chatrooms known by BitlBee.
+				</para>
+			</description>
+		</bitlbee-command>
+
+		<bitlbee-command name="with">
+			<syntax>chat with &lt;nickname&gt;</syntax>
+
+			<description>
+				<para>
+					While most <emphasis>chat</emphasis> subcommands are about named chatrooms, this command can be used to open an unnamed groupchat with one or more persons. This command is what <emphasis>/join #nickname</emphasis> used to do in older BitlBee versions.
+				</para>
+			</description>
+		</bitlbee-command>
+
+		<bitlbee-command name="set">
+			<syntax>chat set &lt;chat id&gt;</syntax>
+			<syntax>chat set &lt;chat id&gt;/&lt;setting&gt;</syntax>
+			<syntax>chat set &lt;chat id&gt;/&lt;setting&gt; &lt;value&gt;</syntax>
+			<syntax>chat set -del &lt;chat id&gt;/&lt;setting&gt;</syntax>
+
+			<description>
+				<para>
+					This command can be used to change various settings for chatrooms.
+				</para>
+				
+				<para>
+					For more infomation about a setting, see <emphasis>help set &lt;setting&gt;</emphasis>.
+				</para>
+				
+				<para>
+					The room ID can be a number (see <emphasis>chat list</emphasis>), or (part of) the name of the room/channel.
 				</para>
 			</description>
@@ -303,4 +390,14 @@
 	</bitlbee-setting>
 
+	<bitlbee-setting name="auto_join" type="boolean" scope="chat">
+		<default>false</default>
+
+		<description>
+			<para>
+				With this option enabled, BitlBee will automatically join this chatroom when you log in.
+			</para>
+		</description>
+	</bitlbee-setting>
+
 	<bitlbee-setting name="auto_reconnect" type="boolean" scope="both">
 		<default>false</default>
@@ -321,14 +418,34 @@
 	</bitlbee-setting>
 
-	<bitlbee-setting name="auto_reconnect_delay" type="integer" scope="global">
-		<default>300</default>
-
-		<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.
+	<bitlbee-setting name="auto_reconnect_delay" type="string" scope="global">
+		<default>5*3&lt;900</default>
+
+		<description>
+			<para>
+				Tell BitlBee after how many seconds it should attempt to bring a broken IM-connection back up.
+			</para>
+
+			<para>
+				This can be one integer, for a constant delay. One can also set it to something like &quot;10*10&quot;, which means wait for ten seconds on the first reconnect, multiply it by ten on every failure. Once successfully connected, this delay is re-set to the initial value. With &lt; you can give a maximum delay.
 			</para>
 
 			<para>
 				See also the <emphasis>auto_reconnect</emphasis> setting.
+			</para>
+		</description>
+	</bitlbee-setting>
+
+	<bitlbee-setting name="away" type="string" scope="both">
+		<description>
+			<para>
+				To mark yourself as away, it is recommended to just use <emphasis>/away</emphasis>, like on normal IRC networks. If you want to mark yourself as away on only one IM network, you can use this per-account setting.
+			</para>
+
+			<para>
+				You can set it to any value and BitlBee will try to map it to the most appropriate away state for every open IM connection, or set it as a free-form away message where possible.
+			</para>
+
+			<para>
+				Any per-account away setting will override globally set away states. To un-set the setting, use <emphasis>set -del away</emphasis>.
 			</para>
 		</description>
@@ -482,4 +599,28 @@
 	</bitlbee-setting>
 
+	<bitlbee-setting name="nick" type="string" scope="chat">
+
+		<description>
+			<para>
+				You can use this option to set your nickname in a chatroom. You won't see this nickname yourself, but other people in the room will. By default, BitlBee will use your username as the chatroom nickname.
+			</para>
+		</description>
+	</bitlbee-setting>
+
+	<bitlbee-setting name="nick_source" type="string" scope="account">
+		<default>handle</default>
+		<possible-values>handle, full_name, first_name</possible-values>
+
+		<description>
+			<para>
+				By default, BitlBee generates a nickname for every contact by taking its handle and chopping off everything after the @. In some cases, this gives very inconvenient nicknames. The Facebook XMPP server is a good example, as all Facebook XMPP handles are numeric.
+			</para>
+
+			<para>
+				With this setting set to <emphasis>full_name</emphasis>, the person's full name is used to generate a nickname. Or if you don't like long nicknames, set this setting to <emphasis>first_name</emphasis> instead and only the first word will be used. Note that the full name can be full of non-ASCII characters which will be stripped off.
+			</para>
+		</description>
+	</bitlbee-setting>
+
 	<bitlbee-setting name="ops" type="string" scope="global">
 		<default>both</default>
@@ -576,5 +717,5 @@
 	<bitlbee-setting name="resource_select" type="string" scope="account">
 		<default>priority</default>
-		<possible-values>priority, time</possible-values>
+		<possible-values>priority, activity</possible-values>
 
 		<description>
@@ -584,5 +725,5 @@
 
 			<para>
-				Normally it's set to <emphasis>priority</emphasis> which means messages will always be delivered to the buddy's resource with the highest priority. If the setting is set to <emphasis>time</emphasis>, messages will be delivered to the resource that was last used to send you a message (or the resource that most recently connected).
+				Normally it's set to <emphasis>priority</emphasis> which means messages will always be delivered to the buddy's resource with the highest priority. If the setting is set to <emphasis>activity</emphasis>, messages will be delivered to the resource that was last used to send you a message (or the resource that most recently connected).
 			</para>
 		</description>
@@ -633,4 +774,20 @@
 			<para>
 				Currently only available for Jabber connections. Set this to true if the server accepts SSL connections.
+			</para>
+		</description>
+	</bitlbee-setting>
+
+	<bitlbee-setting name="status" type="string" scope="both">
+		<description>
+			<para>
+				Certain protocols (like Jabber/XMPP) support status messages, similar to away messages. They can be used to indicate things like your location or activity, without showing up as away/busy.
+			</para>
+
+			<para>
+				This setting can be used to set such a message. It will be available as a per-account setting for protocols that support it, and also as a global setting (which will then automatically be used for all protocols that support it).
+			</para>
+
+			<para>
+				Away states set using <emphasis>/away</emphasis> or the <emphasis>away</emphasis> setting will override this setting. To un-set the setting, use <emphasis>set -del status</emphasis>.
 			</para>
 		</description>
@@ -850,27 +1007,3 @@
 
 	</bitlbee-command>
-
-	<bitlbee-command name="join_chat">
-		<short-description>Join a named groupchat/conference room</short-description>
-		<syntax>join_chat &lt;connection&gt; &lt;room name&gt; [&lt;channel name&gt;] [&lt;room nickname&gt;] [&lt;password&gt;]</syntax>
-
-		<description>
-			<para>
-				On most IM-networks groupchats can be started using the /join command. (<emphasis>/join #foo</emphasis> to start a chatroom with you and <emphasis>foo</emphasis>) This doesn't work with names groupchats though (which exist on Jabber networks and AIM, for example), instead you can use this command.
-			</para>
-
-			<para>
-				The first two arguments are required. <emphasis>room name</emphasis> is the name of the chatroom on the IM-network. <emphasis>channel name</emphasis> is the IRC channel name BitlBee should map this to. <emphasis>room nickname</emphasis> is the nickname you want to have in this channel. If you don't give these options, BitlBee will do the right guesses.
-			</para>
-
-			<para>
-				The following command will join you to the chatroom called <emphasis>bitlbee@conference.bitlbee.org</emphasis>. The channel will be called <emphasis>&amp;bitlbee-help</emphasis> because <emphasis>&amp;bitlbee</emphasis> will already be in use. Your nickname will be <emphasis>help-me</emphasis>.
-			</para>
-		</description>
-
-		<ircexample>
-			<ircline nick="wilmer">join_chat jabber bitlbee@conference.bitlbee.org &amp;bitlbee-help help-me</ircline>
-		</ircexample>
-
-	</bitlbee-command>
 </chapter>
