protocols/ircv3/purpleircv3protocol.c

Sun, 03 Nov 2024 00:05:44 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 03 Nov 2024 00:05:44 -0500
changeset 43045
308e8d0ce68c
parent 43028
dda093fe275e
child 43082
0248f784950d
permissions
-rw-r--r--

remove purple3-url-handler.desktop.in.in

The application that did the launching was removed long ago. Also this should
be implemented by the user interfaces and they might provide separate files to
groups schemas as well.

Testing Done:
Called in the turtles.

Reviewed at https://reviews.imfreedom.org/r/3640/

41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
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: 42469
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: 42469
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: 42469
diff changeset
7 * source distribution.
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42469
diff changeset
8 *
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42469
diff changeset
9 * This library is free software; you can redistribute it and/or modify
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42469
diff changeset
14 * This library is distributed in the hope that it will be useful,
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42469
diff changeset
20 * along with this library; if not, see <https://www.gnu.org/licenses/>.
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #include <glib/gi18n-lib.h>
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #include "purpleircv3protocol.h"
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
27 #include "purpleircv3connection.h"
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
28 #include "purpleircv3core.h"
42320
21cab78fb7d2 IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents: 42044
diff changeset
29 #include "purpleircv3protocolconversation.h"
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
30
42879
dc1e61fb9f00 Make PurpleIRCv3.Protocol and PurpleIRCv3.Connection Final
Gary Kramlich <grim@reaperworld.com>
parents: 42803
diff changeset
31 struct _PurpleIRCv3Protocol {
dc1e61fb9f00 Make PurpleIRCv3.Protocol and PurpleIRCv3.Connection Final
Gary Kramlich <grim@reaperworld.com>
parents: 42803
diff changeset
32 PurpleProtocol parent;
dc1e61fb9f00 Make PurpleIRCv3.Protocol and PurpleIRCv3.Connection Final
Gary Kramlich <grim@reaperworld.com>
parents: 42803
diff changeset
33 };
dc1e61fb9f00 Make PurpleIRCv3.Protocol and PurpleIRCv3.Connection Final
Gary Kramlich <grim@reaperworld.com>
parents: 42803
diff changeset
34
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 /******************************************************************************
42646
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
36 * Callbacks
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
37 *****************************************************************************/
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
38 static void
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
39 purple_ircv3_protocol_can_reach_cb(GObject *self, GAsyncResult *result,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
40 gpointer data)
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
41 {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
42 GError *error = NULL;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
43 GTask *task = data;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
44 gboolean can_reach = FALSE;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
45
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
46 /* task and result share a cancellable, so either can be used here. */
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
47 if(g_task_return_error_if_cancelled(task)) {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
48 g_clear_object(&task);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
49
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
50 return;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
51 }
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
52
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
53 can_reach = g_network_monitor_can_reach_finish(G_NETWORK_MONITOR(self), result,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
54 &error);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
55
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
56 if(error != NULL) {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
57 g_task_return_error(task, error);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
58 } else if(!can_reach) {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
59 g_task_return_new_error(task, PURPLE_IRCV3_DOMAIN, 0,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
60 _("Unknown network error."));
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
61 } else {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
62 g_task_return_boolean(task, TRUE);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
63 }
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
64
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
65 g_clear_object(&task);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
66 }
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
67
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
68 /******************************************************************************
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
69 * PurpleProtocol Implementation
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
70 *****************************************************************************/
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
71 static GList *
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
72 purple_ircv3_protocol_get_user_splits(G_GNUC_UNUSED PurpleProtocol *protocol) {
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
73 PurpleAccountUserSplit *split = NULL;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
74 GList *splits = NULL;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
75
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
76 split = purple_account_user_split_new(_("Server"),
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
77 PURPLE_IRCV3_DEFAULT_SERVER,
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
78 '@');
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
79 splits = g_list_append(splits, split);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
80
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
81 return splits;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
82 }
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
83
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
84 static GList *
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
85 purple_ircv3_protocol_get_account_options(G_GNUC_UNUSED PurpleProtocol *protocol)
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
86 {
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
87 PurpleAccountOption *option;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
88 GList *options = NULL;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
89
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
90 option = purple_account_option_int_new(_("Port"), "port",
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
91 PURPLE_IRCV3_DEFAULT_TLS_PORT);
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
92 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
93
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
94 option = purple_account_option_bool_new(_("Use TLS"), "use-tls", TRUE);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
95 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
96
41955
d3117aac63b3 Add support for server passwords to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41941
diff changeset
97 option = purple_account_option_string_new(_("Server password"),
d3117aac63b3 Add support for server passwords to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41941
diff changeset
98 "server-password", "");
42469
b789ce8f43e2 IRCv3: Mask the server password in account options
Gary Kramlich <grim@reaperworld.com>
parents: 42320
diff changeset
99 purple_account_option_string_set_masked(option, TRUE);
41955
d3117aac63b3 Add support for server passwords to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41941
diff changeset
100 options = g_list_append(options, option);
d3117aac63b3 Add support for server passwords to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41941
diff changeset
101
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
102 option = purple_account_option_string_new(_("Ident name"), "ident", "");
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
103 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
104
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
105 option = purple_account_option_string_new(_("Real name"), "real-name", "");
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
106 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
107
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
108 option = purple_account_option_string_new(_("SASL login name"),
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
109 "sasl-login-name", "");
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
110 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
111
42044
37eaa6065a9a IRCv3: Add an account option to specify the SASL mechanisms
Gary Kramlich <grim@reaperworld.com>
parents: 41977
diff changeset
112 option = purple_account_option_string_new(_("SASL mechanisms"),
37eaa6065a9a IRCv3: Add an account option to specify the SASL mechanisms
Gary Kramlich <grim@reaperworld.com>
parents: 41977
diff changeset
113 "sasl-mechanisms", "");
37eaa6065a9a IRCv3: Add an account option to specify the SASL mechanisms
Gary Kramlich <grim@reaperworld.com>
parents: 41977
diff changeset
114 options = g_list_append(options, option);
37eaa6065a9a IRCv3: Add an account option to specify the SASL mechanisms
Gary Kramlich <grim@reaperworld.com>
parents: 41977
diff changeset
115
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
116 option = purple_account_option_bool_new(_("Allow plaintext SASL auth over "
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
117 "unencrypted connection"),
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
118 "plain-sasl-in-clear", FALSE);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
119 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
120
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
121 option = purple_account_option_int_new(_("Seconds between sending "
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
122 "messages"),
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
123 "rate-limit-interval", 2);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
124 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
125
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
126 option = purple_account_option_int_new(_("Maximum messages to send at "
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
127 "once"),
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
128 "rate-limit-burst", 5);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
129 options = g_list_append(options, option);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
130
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
131 return options;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
132 }
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
133
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
134 static PurpleConnection *
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
135 purple_ircv3_protocol_create_connection(PurpleProtocol *protocol,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
136 PurpleAccount *account,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
137 const char *password,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
138 GError **error)
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
139 {
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
140 const char *username = NULL;
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
141
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
142 g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
143 g_return_val_if_fail(PURPLE_IS_ACCOUNT(account), NULL);
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
144
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
145 /* Make sure the username (which includes the servername via usersplits),
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
146 * does not contain any whitespace.
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
147 */
42803
984f8dfabb47 Update the protocols to use get id and username directly on PurpleAccount
Gary Kramlich <grim@reaperworld.com>
parents: 42697
diff changeset
148 username = purple_account_get_username(account);
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
149 if(strpbrk(username, " \t\v\r\n") != NULL) {
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
150 g_set_error(error,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
151 PURPLE_CONNECTION_ERROR,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
152 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
153 _("IRC nick and server may not contain whitespace"));
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
154
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
155 return NULL;
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
156 }
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
157
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
158 return g_object_new(
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
159 PURPLE_IRCV3_TYPE_CONNECTION,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
160 "protocol", protocol,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
161 "account", account,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
162 "password", password,
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
163 NULL);
41783
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
164 }
5ea6c18ef7a8 Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41772
diff changeset
165
42646
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
166 static void
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
167 purple_ircv3_protocol_can_connect_async(PurpleProtocol *protocol,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
168 PurpleAccount *account,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
169 GCancellable *cancellable,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
170 GAsyncReadyCallback callback,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
171 gpointer data)
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
172 {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
173 GNetworkMonitor *monitor = NULL;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
174 GSocketConnectable *connectable = NULL;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
175 GStrv parts = NULL;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
176 GTask *task = NULL;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
177 const char *username = NULL;
42879
dc1e61fb9f00 Make PurpleIRCv3.Protocol and PurpleIRCv3.Connection Final
Gary Kramlich <grim@reaperworld.com>
parents: 42803
diff changeset
178 int port = 0;
42646
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
179
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
180 task = g_task_new(protocol, cancellable, callback, data);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
181
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
182 monitor = g_network_monitor_get_default();
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
183
42803
984f8dfabb47 Update the protocols to use get id and username directly on PurpleAccount
Gary Kramlich <grim@reaperworld.com>
parents: 42697
diff changeset
184 username = purple_account_get_username(account);
42646
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
185 parts = g_strsplit(username, "@", 2);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
186 port = purple_account_get_int(account, "port",
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
187 PURPLE_IRCV3_DEFAULT_TLS_PORT);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
188
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
189 connectable = g_network_address_new(parts[1], (guint16)port);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
190 g_strfreev(parts);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
191
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
192 g_network_monitor_can_reach_async(monitor, connectable, cancellable,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
193 purple_ircv3_protocol_can_reach_cb,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
194 task);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
195 g_clear_object(&connectable);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
196 }
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
197
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
198 static gboolean
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
199 purple_ircv3_protocol_can_connect_finish(G_GNUC_UNUSED PurpleProtocol *protocol,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
200 GAsyncResult *result,
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
201 GError **error)
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
202 {
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
203 return g_task_propagate_boolean(G_TASK(result), error);
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
204 }
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
205
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
206 /******************************************************************************
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 * GObject Implementation
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 *****************************************************************************/
41916
4ee9cb957595 Implement sending im's for IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41870
diff changeset
209 G_DEFINE_DYNAMIC_TYPE_EXTENDED(
4ee9cb957595 Implement sending im's for IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41870
diff changeset
210 PurpleIRCv3Protocol,
4ee9cb957595 Implement sending im's for IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41870
diff changeset
211 purple_ircv3_protocol,
4ee9cb957595 Implement sending im's for IRCv3
Gary Kramlich <grim@reaperworld.com>
parents: 41870
diff changeset
212 PURPLE_TYPE_PROTOCOL,
42879
dc1e61fb9f00 Make PurpleIRCv3.Protocol and PurpleIRCv3.Connection Final
Gary Kramlich <grim@reaperworld.com>
parents: 42803
diff changeset
213 G_TYPE_FLAG_FINAL,
42320
21cab78fb7d2 IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents: 42044
diff changeset
214 G_IMPLEMENT_INTERFACE_DYNAMIC(PURPLE_TYPE_PROTOCOL_CONVERSATION,
21cab78fb7d2 IRCv3: Move from ProtocolIM to ProtocolConversation
Gary Kramlich <grim@reaperworld.com>
parents: 42044
diff changeset
215 purple_ircv3_protocol_conversation_init))
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
217 static void
41941
355bd17297f0 Set the C standard to C99 and set warning_level to 2 for the IRCv3 Protocol Plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41926
diff changeset
218 purple_ircv3_protocol_init(G_GNUC_UNUSED PurpleIRCv3Protocol *protocol) {
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
219 }
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221 static void
41941
355bd17297f0 Set the C standard to C99 and set warning_level to 2 for the IRCv3 Protocol Plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41926
diff changeset
222 purple_ircv3_protocol_class_finalize(G_GNUC_UNUSED PurpleIRCv3ProtocolClass *klass) {
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 }
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225 static void
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 purple_ircv3_protocol_class_init(PurpleIRCv3ProtocolClass *klass) {
41772
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
227 PurpleProtocolClass *protocol_class = PURPLE_PROTOCOL_CLASS(klass);
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
228
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
229 protocol_class->get_user_splits = purple_ircv3_protocol_get_user_splits;
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
230 protocol_class->get_account_options =
e393090804c1 Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents: 41750
diff changeset
231 purple_ircv3_protocol_get_account_options;
41870
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
232 protocol_class->create_connection =
7668d023ae05 Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
233 purple_ircv3_protocol_create_connection;
42646
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
234 protocol_class->can_connect_async =
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
235 purple_ircv3_protocol_can_connect_async;
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
236 protocol_class->can_connect_finish =
b82b5609c044 Use PurpleProtocol.can_connect_async in the login process
Gary Kramlich <grim@reaperworld.com>
parents: 42568
diff changeset
237 purple_ircv3_protocol_can_connect_finish;
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238 }
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240 /******************************************************************************
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241 * GObject Implementation
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 *****************************************************************************/
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 void
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
244 purple_ircv3_protocol_register(GPluginNativePlugin *plugin) {
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
245 purple_ircv3_protocol_register_type(G_TYPE_MODULE(plugin));
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
246 }
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248 PurpleProtocol *
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249 purple_ircv3_protocol_new(void) {
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250 return g_object_new(
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 PURPLE_IRCV3_TYPE_PROTOCOL,
41787
d25e0133b9ea Fix the ircv3 protocol id
Gary Kramlich <grim@reaperworld.com>
parents: 41783
diff changeset
252 "id", "prpl-ircv3",
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
253 "name", "IRCv3",
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 "description", _("Version 3 of Internet Relay Chat (IRC)."),
43028
dda093fe275e IRCv3: Create notifications for incoming WALLOPS messages
Gary Kramlich <grim@reaperworld.com>
parents: 42879
diff changeset
255 "icon-name", PURPLE_IRCV3_ICON_NAME,
41750
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 "icon-resource-path", "/im/pidgin/libpurple/ircv3/icons",
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
257 "options", OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL |
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258 OPT_PROTO_SLASH_COMMANDS_NATIVE,
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259 NULL);
7ab7d79ac0c5 Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260 }

mercurial