summaryrefslogtreecommitdiff
path: root/src/plugins/relay/api
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-02-10 22:30:03 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-04-07 13:16:47 +0200
commit786f889251e6a962a1fdceef7e784fb3408ec974 (patch)
tree8d10011110027df2c988001e9c1ceb69bcc34bd8 /src/plugins/relay/api
parenta89bc85dc0706517f888ff43dff5e147b034744c (diff)
downloadweechat-786f889251e6a962a1fdceef7e784fb3408ec974.zip
relay: add command `/remote`, add remote configuration in relay.conf (issue #2066)
Diffstat (limited to 'src/plugins/relay/api')
-rw-r--r--src/plugins/relay/api/relay-api-protocol.c2
-rw-r--r--src/plugins/relay/api/relay-api.c12
2 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/relay/api/relay-api-protocol.c b/src/plugins/relay/api/relay-api-protocol.c
index ac3b8f13e..265e0df3b 100644
--- a/src/plugins/relay/api/relay-api-protocol.c
+++ b/src/plugins/relay/api/relay-api-protocol.c
@@ -808,7 +808,7 @@ relay_api_protocol_recv_http (struct t_relay_client *client)
{ NULL, NULL, 0, 0, 0, NULL },
};
- if (!client->http_req || RELAY_CLIENT_HAS_ENDED(client))
+ if (!client->http_req || RELAY_STATUS_HAS_ENDED(client->status))
return;
/* display debug message */
diff --git a/src/plugins/relay/api/relay-api.c b/src/plugins/relay/api/relay-api.c
index 054ddbf29..e20e147f7 100644
--- a/src/plugins/relay/api/relay-api.c
+++ b/src/plugins/relay/api/relay-api.c
@@ -208,14 +208,16 @@ relay_api_alloc_with_infolist (struct t_relay_client *client,
RELAY_API_DATA(client, sync_colors) = weechat_infolist_integer (
infolist, "sync_colors");
- if (!RELAY_CLIENT_HAS_ENDED(client) && RELAY_API_DATA(client, sync_enabled))
+ if (!RELAY_STATUS_HAS_ENDED(client->status)
+ && RELAY_API_DATA(client, sync_enabled))
+ {
relay_api_hook_signals (client);
+ }
}
/*
- * Returns the client initial status: it is always "waiting_auth" for API
- * protocol because we always expect the "init" command, even without any
- * password.
+ * Returns the client initial status: it is always "authenticating" for API
+ * protocol because we always expect the client to authenticate.
*/
enum t_relay_status
@@ -224,7 +226,7 @@ relay_api_get_initial_status (struct t_relay_client *client)
/* make C compiler happy */
(void) client;
- return RELAY_STATUS_WAITING_AUTH;
+ return RELAY_STATUS_AUTHENTICATING;
}
/*