Sat, 12 Nov 2022 15:37:03 -0600
Remove the Novell GroupWise protocol plugin
We haven't been able to test this in forever, and as such, it hasn't received
any real maintenance. So rather than continue this cycle we're going to cut our
loses.
Testing Done:
Compiled and greped everything. I've left the man pages for now as they need their own overhaul.
Reviewed at https://reviews.imfreedom.org/r/2021/
|
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 | * |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * 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
|
7 | * 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
|
8 | * (at your option) any later version. |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * 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
|
12 | * 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
|
13 | * GNU General Public License for more details. |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
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 | #include <glib/gi18n-lib.h> |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #include "purpleircv3protocol.h" |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
23 | #include "purpleircv3connection.h" |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
24 | #include "purpleircv3core.h" |
|
41772
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
25 | |
|
41750
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | /****************************************************************************** |
|
41772
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
27 | * PurpleProtocol Implementation |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
28 | *****************************************************************************/ |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
29 | static GList * |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
30 | 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
|
31 | PurpleAccountUserSplit *split = NULL; |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
32 | GList *splits = NULL; |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
33 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
34 | split = purple_account_user_split_new(_("Server"), |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
35 | 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
|
36 | '@'); |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
37 | 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
|
38 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
39 | return splits; |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
40 | } |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
41 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
42 | static GList * |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
43 | 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
|
44 | { |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
45 | PurpleAccountOption *option; |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
46 | GList *options = NULL; |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
47 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
48 | 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
|
49 | 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
|
50 | 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
|
51 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
52 | 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
|
53 | 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
|
54 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
55 | 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
|
56 | 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
|
57 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
58 | 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
|
59 | 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
|
60 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
61 | 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
|
62 | "sasl-login-name", ""); |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
63 | 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
|
64 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
65 | 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
|
66 | "unencrypted connection"), |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
67 | "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
|
68 | 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
|
69 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
70 | 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
|
71 | "messages"), |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
72 | "rate-limit-interval", 2); |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
73 | 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
|
74 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
75 | 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
|
76 | "once"), |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
77 | "rate-limit-burst", 5); |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
78 | 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
|
79 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
80 | return options; |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
81 | } |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
82 | |
|
41870
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
83 | static PurpleConnection * |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
84 | 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
|
85 | PurpleAccount *account, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
86 | const char *password, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
87 | GError **error) |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
88 | { |
|
41870
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
89 | const char *username = NULL; |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
90 | |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
91 | 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
|
92 | 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
|
93 | |
|
41870
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
94 | /* 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
|
95 | * 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
|
96 | */ |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
97 | username = purple_account_get_username(account); |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
98 | 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
|
99 | g_set_error(error, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
100 | PURPLE_CONNECTION_ERROR, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
101 | 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
|
102 | _("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
|
103 | |
|
41870
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
104 | return NULL; |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
105 | } |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
106 | |
|
41870
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
107 | return g_object_new( |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
108 | PURPLE_IRCV3_TYPE_CONNECTION, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
109 | "protocol", protocol, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
110 | "account", account, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
111 | "password", password, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
112 | NULL); |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
113 | } |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
114 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
115 | static GList * |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
116 | purple_ircv3_protocol_status_types(G_GNUC_UNUSED PurpleProtocol *protocol, |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
117 | PurpleAccount *account) |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
118 | { |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
119 | PurpleStatusType *type = NULL; |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
120 | GList *types = NULL; |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
121 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
122 | type = purple_status_type_new(PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
123 | types = g_list_append(types, type); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
124 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
125 | type = purple_status_type_new_with_attrs( |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
126 | PURPLE_STATUS_AWAY, NULL, NULL, TRUE, TRUE, FALSE, |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
127 | "message", _("Message"), purple_value_new(G_TYPE_STRING), |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
128 | NULL); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
129 | types = g_list_append(types, type); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
130 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
131 | type = purple_status_type_new(PURPLE_STATUS_OFFLINE, NULL, NULL, TRUE); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
132 | types = g_list_append(types, type); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
133 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
134 | return types; |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
135 | } |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
136 | |
|
41772
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
137 | /****************************************************************************** |
|
41750
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | * GObject Implementation |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
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 | G_DEFINE_DYNAMIC_TYPE(PurpleIRCv3Protocol, purple_ircv3_protocol, |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
141 | PURPLE_TYPE_PROTOCOL) |
|
41750
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
142 | |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
143 | static void |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | purple_ircv3_protocol_init(PurpleIRCv3Protocol *protocol) { |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
145 | } |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
146 | |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
147 | static void |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
148 | purple_ircv3_protocol_class_finalize(PurpleIRCv3ProtocolClass *klass) { |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
149 | } |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
150 | |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | static void |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
152 | 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
|
153 | 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
|
154 | |
|
e393090804c1
Add user splits and account options to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41750
diff
changeset
|
155 | 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
|
156 | 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
|
157 | 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
|
158 | protocol_class->create_connection = |
|
7668d023ae05
Update the IRCv3 protocol plugin to the new connection setup
Gary Kramlich <grim@reaperworld.com>
parents:
41814
diff
changeset
|
159 | purple_ircv3_protocol_create_connection; |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
41772
diff
changeset
|
160 | protocol_class->status_types = purple_ircv3_protocol_status_types; |
|
41750
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | } |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | /****************************************************************************** |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | * GObject Implementation |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | *****************************************************************************/ |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | void |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | purple_ircv3_protocol_register(GPluginNativePlugin *plugin) { |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | 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
|
169 | } |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | PurpleProtocol * |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | purple_ircv3_protocol_new(void) { |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | return g_object_new( |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | PURPLE_IRCV3_TYPE_PROTOCOL, |
|
41787
d25e0133b9ea
Fix the ircv3 protocol id
Gary Kramlich <grim@reaperworld.com>
parents:
41783
diff
changeset
|
175 | "id", "prpl-ircv3", |
|
41750
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | "name", "IRCv3", |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | "description", _("Version 3 of Internet Relay Chat (IRC)."), |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | "icon-name", "im-ircv3", |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | "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
|
180 | "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
|
181 | OPT_PROTO_SLASH_COMMANDS_NATIVE, |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | NULL); |
|
7ab7d79ac0c5
Create a skeleton for the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | } |