aboutsummaryrefslogtreecommitdiffstats
path: root/bitlbee.h
diff options
context:
space:
mode:
authorjgeboski <jgeboski@gmail.com>2016-06-22 14:54:52 -0400
committerjgeboski <jgeboski@gmail.com>2016-09-19 20:39:05 -0700
commita33ee0fbe4c9b87e38ab46990bba16a7fb362bab (patch)
tree85fbde9b8e50b71eddb50cf6226ba9973aa05ef9 /bitlbee.h
parent67ea361f9f8b2a197e8e52055e4d779a36a876f5 (diff)
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 <account id> 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 <account id> !<index> [channel]
Diffstat (limited to 'bitlbee.h')
-rw-r--r--bitlbee.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitlbee.h b/bitlbee.h
index de54d05c..ffb1fc38 100644
--- a/bitlbee.h
+++ b/bitlbee.h
@@ -172,6 +172,7 @@ void root_command_string(irc_t *irc, char *command);
void root_command(irc_t *irc, char *command[]);
gboolean root_command_add(const char *command, int params, void (*func)(irc_t *, char **args), int flags);
gboolean cmd_identify_finish(gpointer data, gint fd, b_input_condition cond);
+void cmd_chat_list_finish(struct im_connection *ic);
gboolean bitlbee_shutdown(gpointer data, gint fd, b_input_condition cond);
char *set_eval_root_nick(set_t *set, char *new_nick);