From a33ee0fbe4c9b87e38ab46990bba16a7fb362bab Mon Sep 17 00:00:00 2001 From: jgeboski Date: Wed, 22 Jun 2016 14:54:52 -0400 Subject: Added an interface for the listing of existing chatrooms Several protocols can provide a list of existing chatrooms that a user is able join. This is crucial for the usage of several protocols, most notably Purple and Facebook. Plugins wishing to support this extended functionality must implement the new prpl->chat_list() function. This implemented function will in most cases send a remote request for the list of chatrooms. Once the list of chatrooms is obtained, a bee_chat_info_t GSList must be created and assigned to the im_connection->chatlist field. Then a call to the bee_chat_list_finish() is needed to display the list to the user. The chat list is maintained entirely by the plugin, so it is important to ensure all pointers related to the chat list remain valid until the chat list is set to NULL. This list is used internally by bitlbee to calculate indexes, which then allows the user to join a chat with an index, rather than some random identifier. It also important to ensure the list is properly freed whenever it is updated, or when the account is disconnect via the prpl->logout() function. On the user interface side of things, the 'chat list' subcommand was recommissioned. For a user to list the existing chat rooms: chat list Afterwards a user can join a chatroom in the list with its index. This extends the functionality of the 'chat add' subcommand by adding in support for the exclamation point operator to denote an index. chat add ! [channel] --- doc/user-guide/commands.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc/user-guide') diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index 2f167948..fa36d6b7 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -263,7 +263,7 @@ - chat add <account id> <room> [<channel>] + chat add <account id> <room|!index> [<channel>] @@ -281,6 +281,16 @@ + + chat list <account id> [<server>] + + + + List existing chatrooms provided by an account. BitlBee needs this to propogate an internal list of chats. The existing chat can then be added with chat add. + + + + chat with <nickname> -- cgit v1.2.3 From 028ca92f3a36fed8ebb0a6507e64a50938049e53 Mon Sep 17 00:00:00 2001 From: dequis Date: Tue, 20 Sep 2016 23:48:14 -0300 Subject: doc: some 'chat list' related help improvements --- doc/user-guide/commands.xml | 19 ++++++++++++++++--- doc/user-guide/genhelp.py | 3 ++- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'doc/user-guide') diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index fa36d6b7..ef1023cd 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -257,7 +257,7 @@ - Available actions: add, with. See help chat <action> for more information. + Available actions: add, with, list. See help chat <action> for more information. @@ -271,7 +271,7 @@ - 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 chat set) + 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. (channel <channel> set auto_join true) @@ -286,9 +286,18 @@ - List existing chatrooms provided by an account. BitlBee needs this to propogate an internal list of chats. The existing chat can then be added with chat add. + List existing chatrooms provided by an account. BitlBee needs this to propogate an internal list of chats. The existing chat can then be added with chat add, using the number in the index column after a "!" as a shortcut. + + + chat list facebook + Index Title Topic + 1 869891016470949 cool kids club + 2 457892181062459 uncool kids club + 2 facebook chatrooms + chat add facebook !1 #cool-kids-club + @@ -298,6 +307,10 @@ While most chat subcommands are about named chatrooms, this command can be used to open an unnamed groupchat with one or more persons. This command is what /join #nickname used to do in older BitlBee versions. + + + Another way to do this is to join to a new, empty channel with /join #newchannel and invite the first person with /invite nickname + diff --git a/doc/user-guide/genhelp.py b/doc/user-guide/genhelp.py index ec619344..e9a3b2bf 100644 --- a/doc/user-guide/genhelp.py +++ b/doc/user-guide/genhelp.py @@ -64,7 +64,8 @@ def fix_tree(tag, debug=False, lvl=''): print("%s%r" % (lvl, tag.tag, [tag.tail, normalize(tag.tail)])) # Actually normalize whitespace - tag.text = normalize(tag.text) + if 'pre' not in tag.attrib: + tag.text = normalize(tag.text) tag.tail = normalize(tag.tail) -- cgit v1.2.3