Mercurial > pidgin
comparison plugins/autorecon.c @ 1818:84782d1cb051
[gaim-migrate @ 1828]
details
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 06 May 2001 10:14:51 +0000 |
parents | b367beee6448 |
children | 66783ad29e55 |
comparison
equal
deleted
inserted
replaced
1817:b367beee6448 | 1818:84782d1cb051 |
---|---|
10 char *description() { | 10 char *description() { |
11 return "When you are kicked offline, this reconnects you."; | 11 return "When you are kicked offline, this reconnects you."; |
12 } | 12 } |
13 | 13 |
14 static gboolean do_signon(struct aim_user *u) { | 14 static gboolean do_signon(struct aim_user *u) { |
15 if (!g_list_index(aim_users, u)) | 15 if (g_list_index(aim_users, u) < 0) |
16 return FALSE; | 16 return FALSE; |
17 serv_login(u); | 17 serv_login(u); |
18 return FALSE; | 18 return FALSE; |
19 } | 19 } |
20 | 20 |
21 static void reconnect(struct gaim_connection *gc, void *m) { | 21 static void reconnect(struct gaim_connection *gc, void *m) { |
22 if (gc->wants_to_die) | 22 if (!gc->wants_to_die) |
23 gtk_timeout_add(8000, (GtkFunction)do_signon, gc->user); | 23 gtk_timeout_add(8000, (GtkFunction)do_signon, gc->user); |
24 } | 24 } |
25 | 25 |
26 char *gaim_plugin_init(GModule *handle) { | 26 char *gaim_plugin_init(GModule *handle) { |
27 gaim_signal_connect(handle, event_signoff, reconnect, NULL); | 27 gaim_signal_connect(handle, event_signoff, reconnect, NULL); |