Mercurial > pidgin
annotate plugins/autorecon.c @ 10753:b40a67d45dbb
[gaim-migrate @ 12356]
The Stu pointed out that this is wrong
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 27 Mar 2005 18:05:52 +0000 |
parents | 8d19e10c187f |
children | bb6fea81e770 |
rev | line source |
---|---|
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
1 #include "internal.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
2 |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
3 #include "connection.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
4 #include "debug.h" |
8774 | 5 #include "pluginpref.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5607
diff
changeset
|
6 #include "prpl.h" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
7 #include "signals.h" |
9943 | 8 #include "version.h" |
4202
59751fe608c5
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4113
diff
changeset
|
9 |
8774 | 10 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
11 #define AUTORECON_PLUGIN_ID "core-autorecon" |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
12 |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
13 #define INITIAL 8000 |
4590 | 14 #define MAXTIME 2048000 |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
15 |
6113 | 16 typedef struct { |
17 int delay; | |
18 guint timeout; | |
19 } GaimAutoRecon; | |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
20 |
6113 | 21 static GHashTable *hash = NULL; |
8774 | 22 |
10020 | 23 static GSList *accountReconnecting = NULL; |
24 | |
8774 | 25 #define AUTORECON_OPT "/plugins/core/autorecon" |
10020 | 26 #define OPT_HIDE_CONNECTED AUTORECON_OPT "/hide_connected_error" |
27 #define OPT_HIDE_CONNECTING AUTORECON_OPT "/hide_connecting_error" | |
28 #define OPT_RESTORE_STATE AUTORECON_OPT "/restore_state" | |
29 #define OPT_HIDE_RECONNECTING_DIALOG AUTORECON_OPT "/hide_reconnecting_dialog" | |
8774 | 30 |
31 /* storage of original (old_ops) and modified (new_ops) ui ops to allow us to | |
32 intercept calls to report_disconnect */ | |
33 static GaimConnectionUiOps *old_ops = NULL; | |
34 static GaimConnectionUiOps *new_ops = NULL; | |
35 | |
10748 | 36 static void |
37 connect_progress(GaimConnection *gc, const char *text, | |
38 size_t step, size_t step_count) | |
39 { | |
40 if (old_ops == NULL || old_ops->connect_progress == NULL) { | |
10020 | 41 /* there's nothing to call through to, so don't bother |
42 checking prefs */ | |
43 return; | |
10748 | 44 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 45 g_slist_find(accountReconnecting, gc->account)) { |
46 /* this is a reconnecting, and we're hiding those */ | |
47 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
48 "hide connecting dialog while reconnecting\n"); | |
49 return; | |
50 } | |
10748 | 51 |
10020 | 52 old_ops->connect_progress(gc, text, step, step_count); |
53 } | |
54 | |
10748 | 55 static void |
56 connected(GaimConnection *gc) | |
57 { | |
58 if (old_ops == NULL || old_ops->connected == NULL) { | |
10020 | 59 /* there's nothing to call through to, so don't bother |
60 checking prefs */ | |
61 return; | |
10748 | 62 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 63 g_slist_find(accountReconnecting, gc->account)) { |
64 /* this is a reconnecting, and we're hiding those */ | |
65 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
66 "hide connecting dialog while reconnecting\n"); | |
67 return; | |
68 } | |
10748 | 69 |
10020 | 70 old_ops->connected(gc); |
71 } | |
72 | |
10748 | 73 static void |
74 disconnected(GaimConnection *gc) | |
75 { | |
76 if (old_ops == NULL || old_ops->disconnected == NULL) { | |
10020 | 77 /* there's nothing to call through to, so don't bother |
78 checking prefs */ | |
79 return; | |
10748 | 80 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 81 g_slist_find(accountReconnecting, gc->account)) { |
82 /* this is a reconnecting, and we're hiding those */ | |
83 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
84 "hide connecting dialog while reconnecting\n"); | |
85 return; | |
86 } | |
10748 | 87 |
10020 | 88 old_ops->disconnected(gc); |
89 } | |
90 | |
10748 | 91 static void |
92 notice(GaimConnection *gc, const char *text) | |
93 { | |
94 if (old_ops == NULL || old_ops->notice == NULL) { | |
10020 | 95 /* there's nothing to call through to, so don't bother |
96 checking prefs */ | |
97 return; | |
10748 | 98 } else if (gaim_prefs_get_bool(OPT_HIDE_RECONNECTING_DIALOG) && accountReconnecting && |
10020 | 99 g_slist_find(accountReconnecting, gc->account)) { |
100 /* this is a reconnecting, and we're hiding those */ | |
101 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
102 "hide connecting dialog while reconnecting\n"); | |
103 } | |
10748 | 104 |
10020 | 105 old_ops->notice(gc, text); |
106 } | |
8774 | 107 |
10748 | 108 static void |
109 report_disconnect(GaimConnection *gc, const char *text) | |
110 { | |
111 if (old_ops == NULL || old_ops->report_disconnect == NULL) { | |
8774 | 112 /* there's nothing to call through to, so don't bother |
113 checking prefs */ | |
114 return; | |
115 | |
10748 | 116 } else if (gc->state == GAIM_CONNECTED |
8774 | 117 && gaim_prefs_get_bool(OPT_HIDE_CONNECTED)) { |
118 /* this is a connected error, and we're hiding those */ | |
119 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
10345 | 120 "hid disconnect error message (%s)\n", text); |
8774 | 121 return; |
122 | |
10748 | 123 } else if (gc->state == GAIM_CONNECTING |
8774 | 124 && gaim_prefs_get_bool(OPT_HIDE_CONNECTING)) { |
125 /* this is a connecting error, and we're hiding those */ | |
126 gaim_debug(GAIM_DEBUG_INFO, "autorecon", | |
10345 | 127 "hid error message while connecting (%s)\n", text); |
8774 | 128 return; |
129 } | |
130 | |
131 /* if we haven't returned by now, then let's pass to the real | |
132 function */ | |
133 old_ops->report_disconnect(gc, text); | |
134 } | |
135 | |
136 | |
10748 | 137 static gboolean |
138 do_signon(gpointer data) | |
139 { | |
5587
1c55b1540e18
[gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents:
5227
diff
changeset
|
140 GaimAccount *account = data; |
6113 | 141 GaimAutoRecon *info; |
142 | |
5227
6d1707dc8c3d
[gaim-migrate @ 5597]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
143 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "do_signon called\n"); |
6113 | 144 g_return_val_if_fail(account != NULL, FALSE); |
145 info = g_hash_table_lookup(hash, account); | |
4494
b5a50a6a13b0
[gaim-migrate @ 4769]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
4491
diff
changeset
|
146 |
5607 | 147 if (g_list_index(gaim_accounts_get_all(), account) < 0) |
1817
b367beee6448
[gaim-migrate @ 1827]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1404
diff
changeset
|
148 return FALSE; |
6113 | 149 |
10748 | 150 if (info) |
7372 | 151 info->timeout = 0; |
152 | |
5587
1c55b1540e18
[gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents:
5227
diff
changeset
|
153 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "calling gaim_account_connect\n"); |
10738 | 154 gaim_account_connect(account); |
5587
1c55b1540e18
[gaim-migrate @ 5991]
Christian Hammond <chipx86@chipx86.com>
parents:
5227
diff
changeset
|
155 gaim_debug(GAIM_DEBUG_INFO, "autorecon", "done calling gaim_account_connect\n"); |
6113 | 156 |
1817
b367beee6448
[gaim-migrate @ 1827]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1404
diff
changeset
|
157 return FALSE; |
1378
aedeb1218a0a
[gaim-migrate @ 1388]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1165
diff
changeset
|
158 } |
aedeb1218a0a
[gaim-migrate @ 1388]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1165
diff
changeset
|
159 |
8774 | 160 |
10748 | 161 static void |
162 reconnect(GaimConnection *gc, void *m) | |
163 { | |
6113 | 164 GaimAccount *account; |
165 GaimAutoRecon *info; | |
10020 | 166 GSList* listAccount; |
6113 | 167 |
168 g_return_if_fail(gc != NULL); | |
169 account = gaim_connection_get_account(gc); | |
170 info = g_hash_table_lookup(hash, account); | |
10020 | 171 if (accountReconnecting) |
172 listAccount = g_slist_find(accountReconnecting, account); | |
173 else | |
174 listAccount = NULL; | |
6113 | 175 |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
176 if (!gc->wants_to_die) { |
6113 | 177 if (info == NULL) { |
178 info = g_new0(GaimAutoRecon, 1); | |
179 g_hash_table_insert(hash, account, info); | |
180 info->delay = INITIAL; | |
8249 | 181 } else { |
6113 | 182 info->delay = MIN(2 * info->delay, MAXTIME); |
8250 | 183 if (info->timeout != 0) |
184 g_source_remove(info->timeout); | |
8249 | 185 } |
6113 | 186 info->timeout = g_timeout_add(info->delay, do_signon, account); |
10748 | 187 |
10020 | 188 if (!listAccount) |
189 accountReconnecting = g_slist_prepend(accountReconnecting, account); | |
6113 | 190 } else if (info != NULL) { |
191 g_hash_table_remove(hash, account); | |
10748 | 192 |
10020 | 193 if (listAccount) |
194 accountReconnecting = g_slist_delete_link(accountReconnecting, listAccount); | |
2216
66783ad29e55
[gaim-migrate @ 2226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1818
diff
changeset
|
195 } |
9546 | 196 } |
8774 | 197 |
6113 | 198 static void |
10748 | 199 reconnected(GaimConnection *gc, void *m) |
200 { | |
10020 | 201 GaimAccount *account; |
202 | |
10574 | 203 g_return_if_fail(gc != NULL); |
204 | |
205 if (accountReconnecting == NULL) | |
206 return; | |
207 | |
10020 | 208 account = gaim_connection_get_account(gc); |
209 | |
210 accountReconnecting = g_slist_remove(accountReconnecting, account); | |
211 } | |
212 | |
213 static void | |
6113 | 214 free_auto_recon(gpointer data) |
215 { | |
216 GaimAutoRecon *info = data; | |
217 | |
218 if (info->timeout != 0) | |
219 g_source_remove(info->timeout); | |
220 | |
221 g_free(info); | |
222 } | |
223 | |
8774 | 224 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
225 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
226 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
227 { |
8774 | 228 |
229 /* this was the suggested way to override a single function of the | |
230 real ui ops. However, there's a mild concern of having more than one | |
231 bit of code making a new ui op call-through copy. If plugins A and B | |
232 both override the ui ops (in that order), B thinks that the | |
233 overridden ui ops A created was the original. If A unloads first, | |
234 and swaps out and frees its overridden version, then B is calling | |
235 through to a free'd ui op. There needs to be a way to "stack up" | |
236 overridden ui ops or something... I have a good idea of how to write | |
237 such a creature if someone wants it done. - siege 2004-04-20 */ | |
238 | |
10748 | 239 /* get old ops, make a copy with a minor change */ |
8774 | 240 old_ops = gaim_connections_get_ui_ops(); |
241 new_ops = (GaimConnectionUiOps *) g_memdup(old_ops, | |
242 sizeof(GaimConnectionUiOps)); | |
10020 | 243 new_ops->connect_progress = connect_progress; |
244 new_ops->connected = connected; | |
245 new_ops->disconnected = disconnected; | |
246 new_ops->notice = notice; | |
8774 | 247 new_ops->report_disconnect = report_disconnect; |
248 gaim_connections_set_ui_ops(new_ops); | |
249 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
250 hash = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, |
8774 | 251 free_auto_recon); |
10748 | 252 |
10020 | 253 accountReconnecting = NULL; |
3630 | 254 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
255 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
8774 | 256 plugin, GAIM_CALLBACK(reconnect), NULL); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
257 |
10020 | 258 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
259 plugin, GAIM_CALLBACK(reconnected), NULL); | |
260 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
261 return TRUE; |
3802 | 262 } |
263 | |
8774 | 264 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
265 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
266 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
267 { |
8243 | 268 gaim_signal_disconnect(gaim_connections_get_handle(), "signed-off", |
269 plugin, GAIM_CALLBACK(reconnect)); | |
9546 | 270 |
10020 | 271 gaim_signal_disconnect(gaim_connections_get_handle(), "signed-on", |
272 plugin, GAIM_CALLBACK(reconnected)); | |
273 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
274 g_hash_table_destroy(hash); |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
275 hash = NULL; |
10748 | 276 |
10020 | 277 if (accountReconnecting) { |
278 g_slist_free(accountReconnecting); | |
279 accountReconnecting = NULL; | |
280 } | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
281 |
8774 | 282 gaim_connections_set_ui_ops(old_ops); |
283 g_free(new_ops); | |
284 old_ops = new_ops = NULL; | |
285 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
286 return TRUE; |
3630 | 287 } |
288 | |
8774 | 289 |
10748 | 290 static |
291 GaimPluginPrefFrame *get_plugin_pref_frame(GaimPlugin *plugin) | |
292 { | |
8774 | 293 GaimPluginPrefFrame *frame = gaim_plugin_pref_frame_new(); |
294 GaimPluginPref *pref; | |
295 | |
296 pref = gaim_plugin_pref_new_with_label(_("Error Message Suppression")); | |
9549 | 297 gaim_plugin_pref_frame_add(frame, pref); |
8774 | 298 |
299 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTED, | |
300 _("Hide Disconnect Errors")); | |
301 gaim_plugin_pref_frame_add(frame, pref); | |
302 | |
303 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTING, | |
304 _("Hide Login Errors")); | |
305 gaim_plugin_pref_frame_add(frame, pref); | |
306 | |
10020 | 307 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_RECONNECTING_DIALOG, |
308 _("Hide Reconnecting Dialog")); | |
309 gaim_plugin_pref_frame_add(frame, pref); | |
310 | |
8774 | 311 return frame; |
312 } | |
313 | |
314 | |
315 static GaimPluginUiInfo pref_info = { | |
316 get_plugin_pref_frame | |
317 }; | |
318 | |
319 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
320 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
321 { |
9943 | 322 GAIM_PLUGIN_MAGIC, |
323 GAIM_MAJOR_VERSION, | |
324 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
325 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
326 NULL, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
327 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
328 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
329 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
330 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
331 AUTORECON_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
332 N_("Auto-Reconnect"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
333 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
334 /** summary */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
335 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
336 /** description */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
337 N_("When you are kicked offline, this reconnects you."), |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
338 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
339 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
340 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
341 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
342 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
343 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
344 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
345 NULL, /**< ui_info */ |
8774 | 346 NULL, /**< extra_info */ |
8993 | 347 &pref_info, /**< prefs_info */ |
348 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
349 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
350 |
8774 | 351 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
352 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
353 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
354 { |
8774 | 355 gaim_prefs_add_none(AUTORECON_OPT); |
356 gaim_prefs_add_bool(OPT_HIDE_CONNECTED, FALSE); | |
357 gaim_prefs_add_bool(OPT_HIDE_CONNECTING, FALSE); | |
10020 | 358 gaim_prefs_add_bool(OPT_HIDE_RECONNECTING_DIALOG, FALSE); |
9971 | 359 gaim_prefs_remove(OPT_RESTORE_STATE); |
3630 | 360 } |
361 | |
6063 | 362 GAIM_INIT_PLUGIN(autorecon, init_plugin, info) |