summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-05-01 21:01:12 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-05-01 21:01:12 +0200
commit86a8b9fb5f5b61b59dece8b60b5906dce21b413f (patch)
tree735d647229941581488be97fe3eb6bc6bf081b15 /src
parent305175fb8c464a169e767a814f5c400154507e6f (diff)
downloadweechat-86a8b9fb5f5b61b59dece8b60b5906dce21b413f.zip
relay: remove temporary option "nicklistdiff" (in command init), send nicklist diff by default (weechat protocol)
The temporary option was introduced because the nicklist diff was experimental. It is now enabled by default, and there is no way to disable it. Therefore any relay client using weechat protocol must implement the message "_nicklist_diff" (unless nicklist is ignored by client). Extra note: a full nicklist may still be sent if a message with diff would be bigger than whole nicklist. So both full nicklist (message "_nicklist") and nicklist diff (message "_nicklist_diff") must be implemented by clients.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c26
-rw-r--r--src/plugins/relay/weechat/relay-weechat.c5
-rw-r--r--src/plugins/relay/weechat/relay-weechat.h1
3 files changed, 7 insertions, 25 deletions
diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c
index d8b4e3cae..04915e981 100644
--- a/src/plugins/relay/weechat/relay-weechat-protocol.c
+++ b/src/plugins/relay/weechat/relay-weechat-protocol.c
@@ -194,10 +194,6 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(init)
if (compression >= 0)
RELAY_WEECHAT_DATA(client, compression) = compression;
}
- else if (strcmp (options[i], "nicklistdiff") == 0)
- {
- RELAY_WEECHAT_DATA(client, nicklist_diff) = 1;
- }
}
}
weechat_string_free_split (options);
@@ -653,22 +649,14 @@ relay_weechat_protocol_nicklist_map_cb (void *data,
weechat_hdata_get_list (ptr_hdata, "gui_buffers"),
ptr_buffer))
{
- if (RELAY_WEECHAT_DATA(ptr_client, nicklist_diff))
- {
- /*
- * if no diff at all, or if diffs are bigger than nicklist:
- * send whole nicklist
- */
- if (ptr_nicklist
- && ((ptr_nicklist->items_count == 0)
- || (ptr_nicklist->items_count >= weechat_buffer_get_integer (ptr_buffer, "nicklist_count") + 1)))
- {
- ptr_nicklist = NULL;
- }
- }
- else
+ /*
+ * if no diff at all, or if diffs are bigger than nicklist:
+ * send whole nicklist
+ */
+ if (ptr_nicklist
+ && ((ptr_nicklist->items_count == 0)
+ || (ptr_nicklist->items_count >= weechat_buffer_get_integer (ptr_buffer, "nicklist_count") + 1)))
{
- /* it will be removed soon (when clients will handle nicklist diff) */
ptr_nicklist = NULL;
}
diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c
index 714aee387..4dba31192 100644
--- a/src/plugins/relay/weechat/relay-weechat.c
+++ b/src/plugins/relay/weechat/relay-weechat.c
@@ -176,7 +176,6 @@ relay_weechat_alloc (struct t_relay_client *client)
{
RELAY_WEECHAT_DATA(client, password_ok) = (password && password[0]) ? 0 : 1;
RELAY_WEECHAT_DATA(client, compression) = RELAY_WEECHAT_COMPRESSION_ZLIB;
- RELAY_WEECHAT_DATA(client, nicklist_diff) = 0;
RELAY_WEECHAT_DATA(client, buffers_sync) =
weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
@@ -222,7 +221,6 @@ relay_weechat_alloc_with_infolist (struct t_relay_client *client,
/* general stuff */
RELAY_WEECHAT_DATA(client, password_ok) = weechat_infolist_integer (infolist, "password_ok");
RELAY_WEECHAT_DATA(client, compression) = weechat_infolist_integer (infolist, "compression");
- RELAY_WEECHAT_DATA(client, nicklist_diff) = weechat_infolist_integer (infolist, "nicklist_diff");
/* sync of buffers */
RELAY_WEECHAT_DATA(client, buffers_sync) = weechat_hashtable_new (32,
@@ -307,8 +305,6 @@ relay_weechat_add_to_infolist (struct t_infolist_item *item,
return 0;
if (!weechat_infolist_new_var_integer (item, "compression", RELAY_WEECHAT_DATA(client, compression)))
return 0;
- if (!weechat_infolist_new_var_integer (item, "nicklist_diff", RELAY_WEECHAT_DATA(client, nicklist_diff)))
- return 0;
if (!weechat_hashtable_add_to_infolist (RELAY_WEECHAT_DATA(client, buffers_sync), item, "buffers_sync"))
return 0;
@@ -326,7 +322,6 @@ relay_weechat_print_log (struct t_relay_client *client)
{
weechat_log_printf (" password_ok. . . . . . : %d", RELAY_WEECHAT_DATA(client, password_ok));
weechat_log_printf (" compression. . . . . . : %d", RELAY_WEECHAT_DATA(client, compression));
- weechat_log_printf (" nicklist_diff. . . . . : %d", RELAY_WEECHAT_DATA(client, nicklist_diff));
weechat_log_printf (" buffers_sync . . . . . : 0x%lx (hashtable: '%s')",
RELAY_WEECHAT_DATA(client, buffers_sync),
weechat_hashtable_get_string (RELAY_WEECHAT_DATA(client, buffers_sync),
diff --git a/src/plugins/relay/weechat/relay-weechat.h b/src/plugins/relay/weechat/relay-weechat.h
index dc3486eae..ee1646d10 100644
--- a/src/plugins/relay/weechat/relay-weechat.h
+++ b/src/plugins/relay/weechat/relay-weechat.h
@@ -37,7 +37,6 @@ struct t_relay_weechat_data
{
int password_ok; /* password received and OK? */
enum t_relay_weechat_compression compression; /* compression type */
- int nicklist_diff; /* (TEMPORARY) nicklist diff enabled?*/
/* sync of buffers */
struct t_hashtable *buffers_sync; /* buffers synchronized (events */