Mercurial > pidgin
annotate plugins/autorecon.c @ 11256:bb0d7b719af2
[gaim-migrate @ 13430]
I give you regex filtering in the debug window.
We keep a buffer of all the text, so when unpausing all the messages that were output when paused will be displayed, as well as when you change the filter.
This _should_ be alright on systems that don't have regex.h but I haven't gotten anyone to test it recently, if it's busted, just #ifdef HAVE_REGEX_H it.
committer: Tailor Script <tailor@pidgin.im>
| author | Gary Kramlich <grim@reaperworld.com> |
|---|---|
| date | Sat, 13 Aug 2005 22:09:34 +0000 |
| parents | 50224ac8184d |
| children | a32bf50ee5d1 |
| 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 | |
| 10942 | 205 account = gaim_connection_get_account(gc); |
| 206 | |
| 207 g_hash_table_remove(hash, account); | |
| 208 | |
| 10574 | 209 if (accountReconnecting == NULL) |
| 210 return; | |
| 211 | |
| 10020 | 212 accountReconnecting = g_slist_remove(accountReconnecting, account); |
| 213 } | |
| 214 | |
| 215 static void | |
| 6113 | 216 free_auto_recon(gpointer data) |
| 217 { | |
| 218 GaimAutoRecon *info = data; | |
| 219 | |
| 220 if (info->timeout != 0) | |
| 221 g_source_remove(info->timeout); | |
| 222 | |
| 223 g_free(info); | |
| 224 } | |
| 225 | |
| 8774 | 226 |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
227 static gboolean |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
228 plugin_load(GaimPlugin *plugin) |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
229 { |
| 8774 | 230 /* this was the suggested way to override a single function of the |
| 231 real ui ops. However, there's a mild concern of having more than one | |
| 232 bit of code making a new ui op call-through copy. If plugins A and B | |
| 233 both override the ui ops (in that order), B thinks that the | |
| 234 overridden ui ops A created was the original. If A unloads first, | |
| 235 and swaps out and frees its overridden version, then B is calling | |
| 236 through to a free'd ui op. There needs to be a way to "stack up" | |
| 237 overridden ui ops or something... I have a good idea of how to write | |
| 238 such a creature if someone wants it done. - siege 2004-04-20 */ | |
| 239 | |
| 10748 | 240 /* get old ops, make a copy with a minor change */ |
| 8774 | 241 old_ops = gaim_connections_get_ui_ops(); |
| 242 new_ops = (GaimConnectionUiOps *) g_memdup(old_ops, | |
| 243 sizeof(GaimConnectionUiOps)); | |
| 10020 | 244 new_ops->connect_progress = connect_progress; |
| 245 new_ops->connected = connected; | |
| 246 new_ops->disconnected = disconnected; | |
| 247 new_ops->notice = notice; | |
| 8774 | 248 new_ops->report_disconnect = report_disconnect; |
| 249 gaim_connections_set_ui_ops(new_ops); | |
| 250 | |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
251 hash = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, |
| 8774 | 252 free_auto_recon); |
| 10748 | 253 |
| 10020 | 254 accountReconnecting = NULL; |
| 3630 | 255 |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
256 gaim_signal_connect(gaim_connections_get_handle(), "signed-off", |
| 8774 | 257 plugin, GAIM_CALLBACK(reconnect), NULL); |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
258 |
| 10020 | 259 gaim_signal_connect(gaim_connections_get_handle(), "signed-on", |
| 260 plugin, GAIM_CALLBACK(reconnected), NULL); | |
| 261 | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
262 return TRUE; |
| 3802 | 263 } |
| 264 | |
| 8774 | 265 |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
266 static gboolean |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
267 plugin_unload(GaimPlugin *plugin) |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
268 { |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
269 g_hash_table_destroy(hash); |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
270 hash = NULL; |
| 10748 | 271 |
| 10020 | 272 if (accountReconnecting) { |
| 273 g_slist_free(accountReconnecting); | |
| 274 accountReconnecting = NULL; | |
| 275 } | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
276 |
| 8774 | 277 gaim_connections_set_ui_ops(old_ops); |
| 278 g_free(new_ops); | |
| 279 old_ops = new_ops = NULL; | |
| 280 | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
281 return TRUE; |
| 3630 | 282 } |
| 283 | |
| 8774 | 284 |
| 10748 | 285 static |
| 286 GaimPluginPrefFrame *get_plugin_pref_frame(GaimPlugin *plugin) | |
| 287 { | |
| 8774 | 288 GaimPluginPrefFrame *frame = gaim_plugin_pref_frame_new(); |
| 289 GaimPluginPref *pref; | |
| 290 | |
| 291 pref = gaim_plugin_pref_new_with_label(_("Error Message Suppression")); | |
| 9549 | 292 gaim_plugin_pref_frame_add(frame, pref); |
| 8774 | 293 |
| 294 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTED, | |
| 295 _("Hide Disconnect Errors")); | |
| 296 gaim_plugin_pref_frame_add(frame, pref); | |
| 297 | |
| 298 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_CONNECTING, | |
| 299 _("Hide Login Errors")); | |
| 300 gaim_plugin_pref_frame_add(frame, pref); | |
| 301 | |
| 10020 | 302 pref = gaim_plugin_pref_new_with_name_and_label(OPT_HIDE_RECONNECTING_DIALOG, |
| 303 _("Hide Reconnecting Dialog")); | |
| 304 gaim_plugin_pref_frame_add(frame, pref); | |
| 305 | |
| 8774 | 306 return frame; |
| 307 } | |
| 308 | |
| 309 | |
| 310 static GaimPluginUiInfo pref_info = { | |
| 311 get_plugin_pref_frame | |
| 312 }; | |
| 313 | |
| 314 | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
315 static GaimPluginInfo info = |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
316 { |
| 9943 | 317 GAIM_PLUGIN_MAGIC, |
| 318 GAIM_MAJOR_VERSION, | |
| 319 GAIM_MINOR_VERSION, | |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
320 GAIM_PLUGIN_STANDARD, /**< type */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
321 NULL, /**< ui_requirement */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
322 0, /**< flags */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
323 NULL, /**< dependencies */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
324 GAIM_PRIORITY_DEFAULT, /**< priority */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
325 |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
326 AUTORECON_PLUGIN_ID, /**< id */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
327 N_("Auto-Reconnect"), /**< name */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
328 VERSION, /**< version */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
329 /** summary */ |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
330 N_("When you are kicked offline, this reconnects you."), |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
331 /** description */ |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
332 N_("When you are kicked offline, this reconnects you."), |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
333 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */ |
|
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
334 GAIM_WEBSITE, /**< homepage */ |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
335 |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
336 plugin_load, /**< load */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
337 plugin_unload, /**< unload */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
338 NULL, /**< destroy */ |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
339 |
|
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
340 NULL, /**< ui_info */ |
| 8774 | 341 NULL, /**< extra_info */ |
| 8993 | 342 &pref_info, /**< prefs_info */ |
| 343 NULL | |
|
5205
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 |
| 8774 | 346 |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
347 static void |
|
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
348 init_plugin(GaimPlugin *plugin) |
|
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4590
diff
changeset
|
349 { |
| 8774 | 350 gaim_prefs_add_none(AUTORECON_OPT); |
| 351 gaim_prefs_add_bool(OPT_HIDE_CONNECTED, FALSE); | |
| 352 gaim_prefs_add_bool(OPT_HIDE_CONNECTING, FALSE); | |
| 10020 | 353 gaim_prefs_add_bool(OPT_HIDE_RECONNECTING_DIALOG, FALSE); |
| 9971 | 354 gaim_prefs_remove(OPT_RESTORE_STATE); |
| 3630 | 355 } |
| 356 | |
| 6063 | 357 GAIM_INIT_PLUGIN(autorecon, init_plugin, info) |
