Fri, 14 Apr 2000 06:02:26 +0000
[gaim-migrate @ 122]
Fixed the bug where if there is more than one word either being removed or
inserted, remaining checks hold. E.g. if there is a rule that 'm' gets
replaced with 'your roommate' (this is actually is one of my rules), and another
rule is 'u' -> 'you', typing "m u" used to be "your roommate u", but is now
"your roommate you" (don't ask, it's a stupid example, but it has implications).
| 99 | 1 | #define GAIM_PLUGINS |
| 2 | #include "gaim.h" | |
| 3 | #include <gtk/gtk.h> | |
| 4 | ||
| 5 | static int recon; | |
| 6 | ||
| 7 | char *name() { | |
| 8 | return "Auto Reconnect"; | |
| 9 | } | |
| 10 | ||
| 11 | char *description() { | |
| 12 | return "When AOL kicks you off, this auto-reconnects you."; | |
| 13 | } | |
| 14 | ||
| 15 | extern void dologin(GtkWidget *, GtkWidget *); | |
| 16 | ||
| 17 | void do_signon() { | |
| 18 | dologin(NULL, NULL); | |
| 19 | if (query_state() != STATE_OFFLINE) { | |
| 20 | gtk_timeout_remove(recon); | |
| 21 | return; | |
| 22 | } | |
| 23 | } | |
| 24 | ||
| 25 | void reconnect(void *m) { | |
| 26 | recon = gtk_timeout_add(2000, (GtkFunction)do_signon, NULL); | |
| 27 | } | |
| 28 | ||
| 29 | void gaim_plugin_init(void *handle) { | |
| 30 | gaim_signal_connect(handle, event_signoff, reconnect, NULL); | |
| 31 | } |