Mon, 13 Jan 2025 00:36:11 -0600
IRCv3: Remove an old work around that's no longer necessary
I'm not sure what dialog this was referring to, but regardless we don't have
a dialog to create conversations right now so this is unnecessary.
Testing Done:
Called in the turtles.
Bugs closed: PIDGIN-18001
Reviewed at https://reviews.imfreedom.org/r/3747/
|
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); |
|
43059
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
68 | contents = purple_message_get_contents(message); |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
69 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
70 | 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
|
71 | if(purple_message_get_action(message)) { |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
72 | IbisCTCPMessage *ctcp_message = NULL; |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
73 | |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
74 | 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
|
75 | |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
76 | 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
|
77 | 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
|
78 | 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
|
79 | } else { |
|
c574888ce9e2
IRCv3: Add support for sending CTCP ACTION
Gary Kramlich <grim@reaperworld.com>
parents:
43030
diff
changeset
|
80 | 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
|
81 | } |
|
42933
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
82 | |
|
4abacb3d5773
IRCv3: Don't send message that the user input into the status conversation
Gary Kramlich <grim@reaperworld.com>
parents:
42900
diff
changeset
|
83 | 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
|
84 | ibis_client_write(client, ibis_message); |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | task = g_task_new(protocol, cancellable, callback, data); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | g_task_return_boolean(task, TRUE); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | g_clear_object(&task); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | /* 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
|
91 | * https://ircv3.net/specs/extensions/echo-message |
|
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 | purple_conversation_write_message(conversation, message); |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | } |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | static gboolean |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | 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
|
98 | GAsyncResult *result, |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | GError **error) |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | { |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | return g_task_propagate_boolean(G_TASK(result), error); |
|
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 | |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
104 | static PurpleChannelJoinDetails * |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
105 | 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
|
106 | G_GNUC_UNUSED PurpleAccount *account) |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
107 | { |
|
42799
8b06291db25c
Add properties for the maximum length of properties to ChannelJoinDetails
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
108 | 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
|
109 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
110 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
111 | static void |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
112 | 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
|
113 | PurpleAccount *account, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
114 | PurpleChannelJoinDetails* details, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
115 | GCancellable* cancellable, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
116 | GAsyncReadyCallback callback, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
117 | gpointer data) |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
118 | { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
119 | PurpleIRCv3Connection *v3_connection = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
120 | PurpleConnection *connection = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
121 | PurpleConversation *conversation = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
122 | PurpleConversationManager *manager = NULL; |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
123 | IbisClient *client = NULL; |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
124 | IbisMessage *message = NULL; |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
125 | GTask *task = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
126 | const char *name = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
127 | const char *password = NULL; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
128 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
129 | connection = purple_account_get_connection(account); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
130 | v3_connection = PURPLE_IRCV3_CONNECTION(connection); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
131 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
132 | 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
|
133 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
134 | /* 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
|
135 | /* 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
|
136 | 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
|
137 | if(purple_strempty(name)) { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
138 | 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
|
139 | "channel name is empty"); |
|
42450
bd1327c022d4
fix some memory leaks
Markus Fischer <ivanhoe@fiscari.de>
parents:
42378
diff
changeset
|
140 | g_clear_object(&task); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
141 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
142 | return; |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
143 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
144 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
145 | manager = purple_conversation_manager_get_default(); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
146 | 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
|
147 | name); |
|
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 | /* 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
|
150 | if(PURPLE_IS_CONVERSATION(conversation)) { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
151 | g_task_return_boolean(task, TRUE); |
|
42450
bd1327c022d4
fix some memory leaks
Markus Fischer <ivanhoe@fiscari.de>
parents:
42378
diff
changeset
|
152 | g_clear_object(&task); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
153 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
154 | return; |
|
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 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
157 | 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
|
158 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
159 | 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
|
160 | 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
|
161 | 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
|
162 | } else { |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
163 | 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
|
164 | } |
|
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 | conversation = g_object_new( |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
167 | PURPLE_TYPE_CONVERSATION, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
168 | "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
|
169 | "type", PURPLE_CONVERSATION_TYPE_CHANNEL, |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
170 | "id", name, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
171 | "name", name, |
|
43098
13b0954a268b
IRCv3: Fix kick detection and handle online conversation states
Gary Kramlich <grim@reaperworld.com>
parents:
43059
diff
changeset
|
172 | "online", TRUE, |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
173 | NULL); |
|
43030
97ed7473351f
Update the protocols for the ConversationManager deprecations
Gary Kramlich <grim@reaperworld.com>
parents:
43022
diff
changeset
|
174 | 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
|
175 | g_clear_object(&conversation); |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
176 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42653
diff
changeset
|
177 | 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
|
178 | ibis_client_write(client, message); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
179 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
180 | g_task_return_boolean(task, TRUE); |
|
42450
bd1327c022d4
fix some memory leaks
Markus Fischer <ivanhoe@fiscari.de>
parents:
42378
diff
changeset
|
181 | g_clear_object(&task); |
|
42378
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
182 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
183 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
184 | static gboolean |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
185 | 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
|
186 | GAsyncResult *result, |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
187 | GError **error) |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
188 | { |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
189 | 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
|
190 | } |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
191 | |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
192 | static void |
|
42900
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
193 | purple_ircv3_protocol_conversation_leave_conversation_async(PurpleProtocolConversation *protocol, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
194 | PurpleConversation *conversation, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
195 | GCancellable *cancellable, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
196 | GAsyncReadyCallback callback, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
197 | gpointer data) |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
198 | { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
199 | GTask *task = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
200 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
201 | if(purple_conversation_is_channel(conversation)) { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
202 | PurpleIRCv3Connection *v3_connection = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
203 | PurpleAccount *account = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
204 | PurpleConnection *connection = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
205 | IbisClient *client = NULL; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
206 | IbisMessage *message = 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 | account = purple_conversation_get_account(conversation); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
209 | connection = purple_account_get_connection(account); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
210 | v3_connection = PURPLE_IRCV3_CONNECTION(connection); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
211 | client = purple_ircv3_connection_get_client(v3_connection); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
212 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
213 | message = ibis_message_new(IBIS_MSG_PART); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
214 | ibis_message_set_params(message, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
215 | purple_conversation_get_id(conversation), |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
216 | NULL); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
217 | ibis_client_write(client, message); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
218 | } |
|
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 | task = g_task_new(protocol, cancellable, callback, data); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
221 | g_task_set_source_tag(task, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
222 | purple_ircv3_protocol_conversation_leave_conversation_async); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
223 | g_task_return_boolean(task, TRUE); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
224 | g_clear_object(&task); |
|
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 | static gboolean |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
228 | 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
|
229 | GAsyncResult *result, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
230 | GError **error) |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
231 | { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
232 | 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
|
233 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
234 | if(!g_async_result_is_tagged(result, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
235 | purple_ircv3_protocol_conversation_leave_conversation_async)) |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
236 | { |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
237 | g_set_error_literal(error, PURPLE_IRCV3_DOMAIN, 0, |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
238 | "result has unexpected tag"); |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
239 | return 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 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
242 | return g_task_propagate_boolean(G_TASK(result), error); |
|
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 | |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
245 | static void |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
246 | 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
|
247 | PurpleConversation *conversation, |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
248 | PurpleTypingState state) |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
249 | { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
250 | PurpleIRCv3Connection *connection; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
251 | PurpleAccount *account = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
252 | 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
|
253 | PurpleConversation *status_conversation = NULL; |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
254 | IbisClient *client = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
255 | IbisMessage *message = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
256 | IbisTags *tags = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
257 | const char *value = NULL; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
258 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
259 | if(state == PURPLE_TYPING_STATE_TYPING) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
260 | value = IBIS_TYPING_ACTIVE; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
261 | } else if(state == PURPLE_TYPING_STATE_PAUSED) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
262 | value = IBIS_TYPING_PAUSED; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
263 | } else if(state == PURPLE_TYPING_STATE_NONE) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
264 | value = IBIS_TYPING_DONE; |
|
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 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
267 | if(value == NULL) { |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
268 | return; |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
269 | } |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
270 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
271 | account = purple_conversation_get_account(conversation); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
272 | purple_connection = purple_account_get_connection(account); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
273 | connection = PURPLE_IRCV3_CONNECTION(purple_connection); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
274 | |
|
43124
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
275 | 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
|
276 | if(conversation == status_conversation) { |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
277 | return; |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
278 | } |
|
711b58ead6df
IRCv3: Don't send typing messages in the status conversations
Gary Kramlich <grim@reaperworld.com>
parents:
43105
diff
changeset
|
279 | |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
280 | message = ibis_message_new(IBIS_MSG_TAGMSG); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
281 | 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
|
282 | NULL); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
283 | |
|
43022
567e86fd4234
IRCv3: Fix an ibis deprecation
Gary Kramlich <grim@reaperworld.com>
parents:
42933
diff
changeset
|
284 | tags = ibis_message_get_tags(message); |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
285 | ibis_tags_add(tags, IBIS_TAG_TYPING, value); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
286 | |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
287 | client = purple_ircv3_connection_get_client(connection); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
288 | ibis_client_write(client, message); |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
289 | } |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
290 | |
|
43105
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
291 | static void |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
292 | 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
|
293 | PurpleConversation *conversation) |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
294 | { |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
295 | PurpleIRCv3Connection *connection; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
296 | PurpleAccount *account = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
297 | PurpleConnection *purple_connection = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
298 | IbisClient *client = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
299 | IbisMessage *message = NULL; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
300 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
301 | if(purple_conversation_get_online(conversation)) { |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
302 | return; |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
303 | } |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
304 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
305 | if(!purple_conversation_is_channel(conversation)) { |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
306 | /* We need to mark DM's as online again. */ |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
307 | purple_conversation_set_online(conversation, TRUE); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
308 | |
|
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 | account = purple_conversation_get_account(conversation); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
313 | purple_connection = purple_account_get_connection(account); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
314 | connection = PURPLE_IRCV3_CONNECTION(purple_connection); |
|
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 | message = ibis_message_new(IBIS_MSG_JOIN); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
317 | 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
|
318 | NULL); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
319 | |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
320 | client = purple_ircv3_connection_get_client(connection); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
321 | ibis_client_write(client, message); |
|
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 | /* 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
|
324 | * but right now we just assume it was successful. |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
325 | */ |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
326 | purple_conversation_set_online(conversation, TRUE); |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
327 | } |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
328 | |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
329 | void |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
330 | purple_ircv3_protocol_conversation_init(PurpleProtocolConversationInterface *iface) { |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
331 | iface->send_message_async = |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
332 | purple_ircv3_protocol_conversation_send_message_async; |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
333 | iface->send_message_finish = |
|
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
334 | 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
|
335 | |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
336 | iface->get_channel_join_details = |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
337 | 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
|
338 | iface->join_channel_async = |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
339 | 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
|
340 | iface->join_channel_finish = |
|
b64cb320215a
IRCv3: Implement the channel joining functions in PurpleProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
42320
diff
changeset
|
341 | purple_ircv3_protocol_conversation_join_channel_finish; |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
342 | |
|
42900
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
343 | iface->leave_conversation_async = |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
344 | purple_ircv3_protocol_conversation_leave_conversation_async; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
345 | iface->leave_conversation_finish = |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
346 | purple_ircv3_protocol_conversation_leave_conversation_finish; |
|
f7601128636b
IRCv3: Implement leaving conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42889
diff
changeset
|
347 | |
|
42889
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
348 | iface->send_typing = |
|
9e329eab0f9d
IRCv3: Implement sending typing notifications
Gary Kramlich <grim@reaperworld.com>
parents:
42799
diff
changeset
|
349 | purple_ircv3_protocol_conversation_send_typing; |
|
43105
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
350 | iface->refresh = |
|
73562f3b9809
IRCv3: Implement Purple.ProtocolConversation.refresh
Gary Kramlich <grim@reaperworld.com>
parents:
43098
diff
changeset
|
351 | purple_ircv3_protocol_conversation_refresh; |
|
42320
21cab78fb7d2
IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
352 | } |