Mercurial > pidgin
comparison src/prpl.c @ 11257:90be432e8385
[gaim-migrate @ 13432]
Removed warning from core.
I think you should be able to see others' warning levels in the tooltip,
but I haven't managed to warn myself from any client.
Being able to warn others will be dependent on protocol-specific convo
menus.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 14 Aug 2005 03:50:35 +0000 |
parents | b75ce371c812 |
children | e1e47878d0ed |
comparison
equal
deleted
inserted
replaced
11256:bb0d7b719af2 | 11257:90be432e8385 |
---|---|
183 | 183 |
184 gaim_presence_set_status_active(presence, status_id, TRUE); | 184 gaim_presence_set_status_active(presence, status_id, TRUE); |
185 } | 185 } |
186 | 186 |
187 void | 187 void |
188 gaim_prpl_got_account_warning_level(GaimAccount *account, const char *username, | |
189 unsigned int level) | |
190 { | |
191 GaimPresence *presence; | |
192 unsigned int old_level; | |
193 gchar *buf; | |
194 | |
195 g_return_if_fail(account != NULL); | |
196 | |
197 presence = gaim_account_get_presence(account); | |
198 | |
199 gaim_signal_emit(gaim_accounts_get_handle(), "account-warned", | |
200 account, username, level); | |
201 | |
202 old_level = gaim_presence_get_warning_level(presence); | |
203 gaim_presence_set_warning_level(presence, level); | |
204 | |
205 if (old_level >= level) | |
206 return; | |
207 | |
208 if (username == NULL) | |
209 buf = g_strdup_printf(_("%s has just been warned by an anonymous " | |
210 "person.\nYour new warning level is %d%%"), | |
211 gaim_account_get_username(account), | |
212 level); | |
213 else | |
214 buf = g_strdup_printf(_("%s has just been warned by %s.\n" | |
215 "Your new warning level is %d%%"), | |
216 gaim_account_get_username(account), | |
217 username, level); | |
218 | |
219 gaim_notify_info(NULL, NULL, buf, NULL); | |
220 | |
221 g_free(buf); | |
222 } | |
223 | |
224 void | |
225 gaim_prpl_got_user_idle(GaimAccount *account, const char *name, | 188 gaim_prpl_got_user_idle(GaimAccount *account, const char *name, |
226 gboolean idle, time_t idle_time) | 189 gboolean idle, time_t idle_time) |
227 { | 190 { |
228 GSList *l; | 191 GSList *l; |
229 | 192 |
310 } | 273 } |
311 | 274 |
312 old_status = gaim_presence_get_active_status(presence); | 275 old_status = gaim_presence_get_active_status(presence); |
313 gaim_presence_set_status_active(presence, status_id, TRUE); | 276 gaim_presence_set_status_active(presence, status_id, TRUE); |
314 gaim_blist_update_buddy_status(buddy, old_status); | 277 gaim_blist_update_buddy_status(buddy, old_status); |
315 } | |
316 } | |
317 | |
318 void | |
319 gaim_prpl_got_user_warning_level(GaimAccount *account, const char *name, | |
320 unsigned int level) | |
321 { | |
322 GSList *l; | |
323 | |
324 g_return_if_fail(account != NULL); | |
325 g_return_if_fail(name != NULL); | |
326 | |
327 for (l = gaim_find_buddies(account, name); l != NULL; l = l->next) | |
328 { | |
329 GaimBuddy *buddy; | |
330 GaimPresence *presence; | |
331 | |
332 buddy = (GaimBuddy *)l->data; | |
333 | |
334 presence = gaim_buddy_get_presence(buddy); | |
335 | |
336 gaim_presence_set_warning_level(presence, level); | |
337 } | 278 } |
338 } | 279 } |
339 | 280 |
340 void | 281 void |
341 gaim_prpl_change_account_status(GaimAccount *account, | 282 gaim_prpl_change_account_status(GaimAccount *account, |