| 98 } |
99 } |
| 99 |
100 |
| 100 return FALSE; /* do not run again */ |
101 return FALSE; /* do not run again */ |
| 101 } |
102 } |
| 102 |
103 |
| 103 struct last_auto_response *get_last_auto_response(GaimConnection *gc, const char *name) |
104 static struct last_auto_response * |
| |
105 get_last_auto_response(GaimConnection *gc, const char *name) |
| 104 { |
106 { |
| 105 GSList *tmp; |
107 GSList *tmp; |
| 106 struct last_auto_response *lar; |
108 struct last_auto_response *lar; |
| 107 |
109 |
| 108 /* because we're modifying or creating a lar, schedule the |
110 /* because we're modifying or creating a lar, schedule the |
| 125 lar->gc = gc; |
127 lar->gc = gc; |
| 126 lar->sent = 0; |
128 lar->sent = 0; |
| 127 last_auto_responses = g_slist_append(last_auto_responses, lar); |
129 last_auto_responses = g_slist_append(last_auto_responses, lar); |
| 128 |
130 |
| 129 return lar; |
131 return lar; |
| 130 } |
|
| 131 |
|
| 132 void flush_last_auto_responses(GaimConnection *gc) |
|
| 133 { |
|
| 134 GSList *tmp, *cur; |
|
| 135 struct last_auto_response *lar; |
|
| 136 |
|
| 137 tmp = last_auto_responses; |
|
| 138 |
|
| 139 while (tmp) { |
|
| 140 cur = tmp; |
|
| 141 tmp = tmp->next; |
|
| 142 lar = (struct last_auto_response *)cur->data; |
|
| 143 |
|
| 144 if (lar->gc == gc) { |
|
| 145 last_auto_responses = g_slist_remove(last_auto_responses, lar); |
|
| 146 g_free(lar); |
|
| 147 } |
|
| 148 } |
|
| 149 } |
132 } |
| 150 |
133 |
| 151 int serv_send_im(GaimConnection *gc, const char *name, const char *message, |
134 int serv_send_im(GaimConnection *gc, const char *name, const char *message, |
| 152 GaimConvImFlags imflags) |
135 GaimConvImFlags imflags) |
| 153 { |
136 { |