Thu, 02 Jan 2025 22:42:47 -0600
IRCv3: Don't send typing messages in the status conversations
Testing Done:
Used ngrep to verify that typing in the status conversation didn't send typing messages.
Then used ngrep and senpai to verify that typing messages were sent in a channel.
Bugs closed: PIDGIN-18021
Reviewed at https://reviews.imfreedom.org/r/3720/
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
7 | * source distribution. |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
8 | * |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
12 | * (at your option) any later version. |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
17 | * GNU General Public License for more details. |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42511
diff
changeset
|
20 | * along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include <glib/gi18n-lib.h> |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
25 | #include <ibis.h> |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
26 | |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #include "purpleircv3protocolconversation.h" |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #include "purpleircv3connection.h" |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
30 | #include "purpleircv3core.h" |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | /****************************************************************************** |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | * PurpleProtocolConversation Implementation |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | *****************************************************************************/ |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | static void |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | purple_ircv3_protocol_conversation_send_message_async(PurpleProtocolConversation *protocol, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | PurpleConversation *conversation, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | PurpleMessage *message, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | GCancellable *cancellable, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | GAsyncReadyCallback callback, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | gpointer data) |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | { |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | PurpleIRCv3Connection *v3_connection = NULL; |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | PurpleAccount *account = NULL; |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | PurpleConnection *connection = NULL; |
|
42933
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
46 | PurpleConversation *status_conversation = NULL; |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
47 | IbisClient *client = NULL; |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
48 | IbisMessage *ibis_message = NULL; |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | GTask *task = NULL; |
|
43059
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
50 | const char *contents = NULL; |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | const char *id = NULL; |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | account = purple_conversation_get_account(conversation); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | connection = purple_account_get_connection(account); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | v3_connection = PURPLE_IRCV3_CONNECTION(connection); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | |
|
42933
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
57 | /* We ignore non commands to the status conversation. */ |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
58 | status_conversation = purple_ircv3_connection_get_status_conversation(v3_connection); |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
59 | if(conversation == status_conversation) { |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
60 | task = g_task_new(protocol, cancellable, callback, data); |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
61 | g_task_return_boolean(task, TRUE); |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
62 | g_clear_object(&task); |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
63 | |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
64 | return; |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
65 | } |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
66 | |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | id = purple_conversation_get_id(conversation); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | /* TODO: the new message dialog sets the name but not the id and we want to |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | * use the id only, so for now if id is NULL we grab the name. |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | */ |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | if(purple_strempty(id)) { |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | id = purple_conversation_get_name(conversation); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | } |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | |
|
43059
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
75 | contents = purple_message_get_contents(message); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
76 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
77 | ibis_message = ibis_message_new(IBIS_MSG_PRIVMSG); |
|
43059
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
78 | if(purple_message_get_action(message)) { |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
79 | IbisCTCPMessage *ctcp_message = NULL; |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
80 | |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
81 | ibis_message_set_params(ibis_message, id, NULL); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
82 | |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
83 | ctcp_message = ibis_ctcp_message_new(IBIS_CTCP_ACTION); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
84 | ibis_ctcp_message_set_params(ctcp_message, contents, NULL); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
85 | ibis_message_set_ctcp_message(ibis_message, ctcp_message); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
86 | } else { |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
87 | ibis_message_set_params(ibis_message, id, contents, NULL); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
88 | } |
|
42933
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
89 | |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
90 | client = purple_ircv3_connection_get_client(v3_connection); |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
91 | ibis_client_write(client, ibis_message); |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | task = g_task_new(protocol, cancellable, callback, data); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | g_task_return_boolean(task, TRUE); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | g_clear_object(&task); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | /* This will be made conditional when we add echo-message support. |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | * https://ircv3.net/specs/extensions/echo-message |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | */ |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | purple_conversation_write_message(conversation, message); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | } |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | static gboolean |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | purple_ircv3_protocol_conversation_send_message_finish(G_GNUC_UNUSED PurpleProtocolConversation *protocol, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | GAsyncResult *result, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | GError **error) |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | { |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | return g_task_propagate_boolean(G_TASK(result), error); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | } |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
111 | static PurpleChannelJoinDetails * |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
112 | purple_ircv3_protocol_conversation_get_channel_join_details(G_GNUC_UNUSED PurpleProtocolConversation *protocol, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
113 | G_GNUC_UNUSED PurpleAccount *account) |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
114 | { |
|
42799
8b06291db25c
Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
115 | return purple_channel_join_details_new(0, FALSE, 0, TRUE, 0); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
116 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
117 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
118 | static void |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
119 | purple_ircv3_protocol_conversation_join_channel_async(PurpleProtocolConversation *protocol, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
120 | PurpleAccount *account, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
121 | PurpleChannelJoinDetails* details, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
122 | GCancellable* cancellable, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
123 | GAsyncReadyCallback callback, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
124 | gpointer data) |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
125 | { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
126 | PurpleIRCv3Connection *v3_connection = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
127 | PurpleConnection *connection = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
128 | PurpleConversation *conversation = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
129 | PurpleConversationManager *manager = NULL; |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
130 | IbisClient *client = NULL; |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
131 | IbisMessage *message = NULL; |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
132 | GTask *task = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
133 | const char *name = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
134 | const char *password = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
135 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
136 | connection = purple_account_get_connection(account); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
137 | v3_connection = PURPLE_IRCV3_CONNECTION(connection); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
138 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
139 | task = g_task_new(protocol, cancellable, callback, data); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
140 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
141 | /* Validate that the name isn't empty. */ |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
142 | /* TODO: check that name match the ISUPPORT channel prefixes. */ |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
143 | name = purple_channel_join_details_get_name(details); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
144 | if(purple_strempty(name)) { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
145 | g_task_return_new_error(task, PURPLE_IRCV3_DOMAIN, 0, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
146 | "channel name is empty"); |
|
42450
bd1327c022d4
fix some memory leaks
Markus Fischer <ivanhoe@fiscari.de>
parents:
42378
diff
changeset
|
147 | g_clear_object(&task); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
148 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
149 | return; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
150 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
151 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
152 | manager = purple_conversation_manager_get_default(); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
153 | conversation = purple_conversation_manager_find_with_id(manager, account, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
154 | name); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
155 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
156 | /* If the conversation already exists, just return TRUE. */ |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
157 | if(PURPLE_IS_CONVERSATION(conversation)) { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
158 | g_task_return_boolean(task, TRUE); |
|
42450
bd1327c022d4
fix some memory leaks
Markus Fischer <ivanhoe@fiscari.de>
parents:
42378
diff
changeset
|
159 | g_clear_object(&task); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
160 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
161 | return; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
162 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
163 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
164 | message = ibis_message_new(IBIS_MSG_JOIN); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
165 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
166 | password = purple_channel_join_details_get_password(details); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
167 | if(!purple_strempty(password)) { |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
168 | ibis_message_set_params(message, name, password, NULL); |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
169 | } else { |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
170 | ibis_message_set_params(message, name, NULL); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
171 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
172 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
173 | conversation = g_object_new( |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
174 | PURPLE_TYPE_CONVERSATION, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
175 | "account", account, |
|
42653
584895b844d2
PurpleConversationType's values were pascal case when they should be upper snake case
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
176 | "type", PURPLE_CONVERSATION_TYPE_CHANNEL, |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
177 | "id", name, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
178 | "name", name, |
|
43098
13b0954a268b
IRCv3: Fix kick detection and handle online conversation states
Gary Kramlich <grim@reaperworld.com>
parents:
43059
diff
changeset
|
179 | "online", TRUE, |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
180 | NULL); |
|
43030
97ed7473351f
Update the protocols for the ConversationManager deprecations
Gary Kramlich <grim@reaperworld.com>
parents:
43022
diff
changeset
|
181 | purple_conversation_manager_add(manager, conversation); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
182 | g_clear_object(&conversation); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
183 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
184 | client = purple_ircv3_connection_get_client(v3_connection); |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
185 | ibis_client_write(client, message); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
186 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
187 | g_task_return_boolean(task, TRUE); |
|
42450
bd1327c022d4
fix some memory leaks
Markus Fischer <ivanhoe@fiscari.de>
parents:
42378
diff
changeset
|
188 | g_clear_object(&task); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
189 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
190 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
191 | static gboolean |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
192 | purple_ircv3_protocol_conversation_join_channel_finish(G_GNUC_UNUSED PurpleProtocolConversation *protocol, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
193 | GAsyncResult *result, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
194 | GError **error) |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
195 | { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
196 | return g_task_propagate_boolean(G_TASK(result), error); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
197 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
198 | |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
199 | static void |
|
42900
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
200 | purple_ircv3_protocol_conversation_leave_conversation_async(PurpleProtocolConversation *protocol, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
201 | PurpleConversation *conversation, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
202 | GCancellable *cancellable, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
203 | GAsyncReadyCallback callback, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
204 | gpointer data) |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
205 | { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
206 | GTask *task = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
207 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
208 | if(purple_conversation_is_channel(conversation)) { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
209 | PurpleIRCv3Connection *v3_connection = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
210 | PurpleAccount *account = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
211 | PurpleConnection *connection = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
212 | IbisClient *client = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
213 | IbisMessage *message = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
214 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
215 | account = purple_conversation_get_account(conversation); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
216 | connection = purple_account_get_connection(account); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
217 | v3_connection = PURPLE_IRCV3_CONNECTION(connection); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
218 | client = purple_ircv3_connection_get_client(v3_connection); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
219 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
220 | message = ibis_message_new(IBIS_MSG_PART); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
221 | ibis_message_set_params(message, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
222 | purple_conversation_get_id(conversation), |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
223 | NULL); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
224 | ibis_client_write(client, message); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
225 | } |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
226 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
227 | task = g_task_new(protocol, cancellable, callback, data); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
228 | g_task_set_source_tag(task, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
229 | purple_ircv3_protocol_conversation_leave_conversation_async); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
230 | g_task_return_boolean(task, TRUE); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
231 | g_clear_object(&task); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
232 | } |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
233 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
234 | static gboolean |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
235 | purple_ircv3_protocol_conversation_leave_conversation_finish(G_GNUC_UNUSED PurpleProtocolConversation *protocol, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
236 | GAsyncResult *result, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
237 | GError **error) |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
238 | { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
239 | g_return_val_if_fail(G_IS_ASYNC_RESULT(result), FALSE); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
240 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
241 | if(!g_async_result_is_tagged(result, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
242 | purple_ircv3_protocol_conversation_leave_conversation_async)) |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
243 | { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
244 | g_set_error_literal(error, PURPLE_IRCV3_DOMAIN, 0, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
245 | "result has unexpected tag"); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
246 | return FALSE; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
247 | } |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
248 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
249 | return g_task_propagate_boolean(G_TASK(result), error); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
250 | } |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
251 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
252 | static void |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
253 | purple_ircv3_protocol_conversation_send_typing(G_GNUC_UNUSED PurpleProtocolConversation *protocol, |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
254 | PurpleConversation *conversation, |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
255 | PurpleTypingState state) |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
256 | { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
257 | PurpleIRCv3Connection *connection; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
258 | PurpleAccount *account = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
259 | PurpleConnection *purple_connection = NULL; |
|
43124
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
260 | PurpleConversation *status_conversation = NULL; |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
261 | IbisClient *client = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
262 | IbisMessage *message = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
263 | IbisTags *tags = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
264 | const char *value = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
265 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
266 | if(state == PURPLE_TYPING_STATE_TYPING) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
267 | value = IBIS_TYPING_ACTIVE; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
268 | } else if(state == PURPLE_TYPING_STATE_PAUSED) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
269 | value = IBIS_TYPING_PAUSED; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
270 | } else if(state == PURPLE_TYPING_STATE_NONE) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
271 | value = IBIS_TYPING_DONE; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
272 | } |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
273 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
274 | if(value == NULL) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
275 | return; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
276 | } |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
277 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
278 | account = purple_conversation_get_account(conversation); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
279 | purple_connection = purple_account_get_connection(account); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
280 | connection = PURPLE_IRCV3_CONNECTION(purple_connection); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
281 | |
|
43124
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
282 | status_conversation = purple_ircv3_connection_get_status_conversation(connection); |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
283 | if(conversation == status_conversation) { |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
284 | return; |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
285 | } |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
286 | |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
287 | message = ibis_message_new(IBIS_MSG_TAGMSG); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
288 | ibis_message_set_params(message, purple_conversation_get_id(conversation), |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
289 | NULL); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
290 | |
|
43022
567e86fd4234
IRCv3: Fix an ibis deprecation
Gary Kramlich <grim@reaperworld.com>
parents:
42933
diff
changeset
|
291 | tags = ibis_message_get_tags(message); |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
292 | ibis_tags_add(tags, IBIS_TAG_TYPING, value); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
293 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
294 | client = purple_ircv3_connection_get_client(connection); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
295 | ibis_client_write(client, message); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
296 | } |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
297 | |
|
43105
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
298 | static void |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
299 | purple_ircv3_protocol_conversation_refresh(G_GNUC_UNUSED PurpleProtocolConversation *protocol, |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
300 | PurpleConversation *conversation) |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
301 | { |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
302 | PurpleIRCv3Connection *connection; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
303 | PurpleAccount *account = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
304 | PurpleConnection *purple_connection = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
305 | IbisClient *client = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
306 | IbisMessage *message = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
307 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
308 | if(purple_conversation_get_online(conversation)) { |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
309 | return; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
310 | } |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
311 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
312 | if(!purple_conversation_is_channel(conversation)) { |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
313 | /* We need to mark DM's as online again. */ |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
314 | purple_conversation_set_online(conversation, TRUE); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
315 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
316 | return; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
317 | } |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
318 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
319 | account = purple_conversation_get_account(conversation); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
320 | purple_connection = purple_account_get_connection(account); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
321 | connection = PURPLE_IRCV3_CONNECTION(purple_connection); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
322 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
323 | message = ibis_message_new(IBIS_MSG_JOIN); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
324 | ibis_message_set_params(message, purple_conversation_get_id(conversation), |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
325 | NULL); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
326 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
327 | client = purple_ircv3_connection_get_client(connection); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
328 | ibis_client_write(client, message); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
329 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
330 | /* TODO: We need to validate the JOIN by handling the join from the server, |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
331 | * but right now we just assume it was successful. |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
332 | */ |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
333 | purple_conversation_set_online(conversation, TRUE); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
334 | } |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
335 | |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
336 | void |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
337 | purple_ircv3_protocol_conversation_init(PurpleProtocolConversationInterface *iface) { |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
338 | iface->send_message_async = |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
339 | purple_ircv3_protocol_conversation_send_message_async; |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
340 | iface->send_message_finish = |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
341 | purple_ircv3_protocol_conversation_send_message_finish; |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
342 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
343 | iface->get_channel_join_details = |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
344 | purple_ircv3_protocol_conversation_get_channel_join_details; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
345 | iface->join_channel_async = |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
346 | purple_ircv3_protocol_conversation_join_channel_async; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
347 | iface->join_channel_finish = |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
348 | purple_ircv3_protocol_conversation_join_channel_finish; |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
349 | |
|
42900
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
350 | iface->leave_conversation_async = |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
351 | purple_ircv3_protocol_conversation_leave_conversation_async; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
352 | iface->leave_conversation_finish = |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
353 | purple_ircv3_protocol_conversation_leave_conversation_finish; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
354 | |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
355 | iface->send_typing = |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
356 | purple_ircv3_protocol_conversation_send_typing; |
|
43105
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
357 | iface->refresh = |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
358 | purple_ircv3_protocol_conversation_refresh; |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
359 | } |