Mercurial > pidgin.yaz
comparison src/list.c @ 5170:13ffa9ae4282
[gaim-migrate @ 5534]
This makes the buddy ticker plugin work again, and may cause some slight
breakage in some plugins, since it slightly changes the behavior of:
event_buddy_signon
event_buddy_signoff
event_buddy_away
event_buddy_back
Then again, it's nothing compared to the massive breakage being thought up
for the very near future ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 18 Apr 2003 21:49:45 +0000 |
parents | 94f11800cac5 |
children | fefad67de2c7 |
comparison
equal
deleted
inserted
replaced
5169:71927464a1db | 5170:13ffa9ae4282 |
---|---|
116 | 116 |
117 void gaim_blist_update_buddy_status (struct buddy *buddy, int status) | 117 void gaim_blist_update_buddy_status (struct buddy *buddy, int status) |
118 { | 118 { |
119 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; | 119 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; |
120 buddy->uc = status; | 120 buddy->uc = status; |
121 | |
122 if(!(status & UC_UNAVAILABLE)) | |
123 plugin_event(event_buddy_back, buddy->account->gc, buddy->name); | |
124 else | |
125 plugin_event(event_buddy_away, buddy->account->gc, buddy->name); | |
126 | |
121 if (ops) | 127 if (ops) |
122 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); | 128 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); |
123 } | 129 } |
124 | 130 |
125 static gboolean presence_update_timeout_cb(struct buddy *buddy) { | 131 static gboolean presence_update_timeout_cb(struct buddy *buddy) { |
126 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; | 132 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; |
127 | 133 |
128 if(buddy->present == GAIM_BUDDY_SIGNING_ON) | 134 if(buddy->present == GAIM_BUDDY_SIGNING_ON) { |
129 buddy->present = GAIM_BUDDY_ONLINE; | 135 buddy->present = GAIM_BUDDY_ONLINE; |
130 else if(buddy->present == GAIM_BUDDY_SIGNING_OFF) | 136 plugin_event(event_buddy_signon, buddy->account->gc, buddy->name); |
137 } else if(buddy->present == GAIM_BUDDY_SIGNING_OFF) { | |
131 buddy->present = GAIM_BUDDY_OFFLINE; | 138 buddy->present = GAIM_BUDDY_OFFLINE; |
139 } | |
132 | 140 |
133 buddy->timer = 0; | 141 buddy->timer = 0; |
134 | 142 |
135 if (ops) | 143 if (ops) |
136 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); | 144 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); |
142 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; | 150 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; |
143 gboolean do_timer = FALSE; | 151 gboolean do_timer = FALSE; |
144 | 152 |
145 if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) { | 153 if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) { |
146 buddy->present = GAIM_BUDDY_SIGNING_ON; | 154 buddy->present = GAIM_BUDDY_SIGNING_ON; |
155 plugin_event(event_buddy_signon, buddy->account->gc, buddy->name); | |
147 do_timer = TRUE; | 156 do_timer = TRUE; |
148 } else if(GAIM_BUDDY_IS_ONLINE(buddy) && !presence) { | 157 } else if(GAIM_BUDDY_IS_ONLINE(buddy) && !presence) { |
149 buddy->present = GAIM_BUDDY_SIGNING_OFF; | 158 buddy->present = GAIM_BUDDY_SIGNING_OFF; |
159 plugin_event(event_buddy_signoff, buddy->account->gc, buddy->name); | |
150 do_timer = TRUE; | 160 do_timer = TRUE; |
151 } | 161 } |
152 | 162 |
153 if(do_timer) { | 163 if(do_timer) { |
154 if(buddy->timer > 0) | 164 if(buddy->timer > 0) |