Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/hooks.c @ 514:979eb0fe2969
Show status changes in buddy window, if it is open
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 13 Nov 2005 22:46:46 +0100 |
parents | 6c3cd3aa4a91 |
children | e5008032edb8 |
comparison
equal
deleted
inserted
replaced
513:d40c434fff46 | 514:979eb0fe2969 |
---|---|
169 scr_LogPrint(LPRINT_LOGNORM, "Buddy status has changed: [%c>%c] %s %s", | 169 scr_LogPrint(LPRINT_LOGNORM, "Buddy status has changed: [%c>%c] %s %s", |
170 imstatus2char[roster_getstatus(jid, resname)], | 170 imstatus2char[roster_getstatus(jid, resname)], |
171 imstatus2char[status], bn, | 171 imstatus2char[status], bn, |
172 ((status_msg) ? status_msg : "")); | 172 ((status_msg) ? status_msg : "")); |
173 g_free(bn); | 173 g_free(bn); |
174 | |
175 // Write the status change in the buddy's buffer, only if it already exists | |
176 if (scr_BuddyBufferExists(jid)) { | |
177 bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s", | |
178 imstatus2char[roster_getstatus(jid, resname)], | |
179 imstatus2char[status], | |
180 ((status_msg) ? status_msg : "")); | |
181 scr_WriteIncomingMessage(jid, bn, 0, HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG); | |
182 g_free(bn); | |
183 } | |
184 | |
174 roster_setstatus(jid, rn, prio, status, status_msg, role_none, NULL); | 185 roster_setstatus(jid, rn, prio, status, status_msg, role_none, NULL); |
175 buddylist_build(); | 186 buddylist_build(); |
176 scr_DrawRoster(); | 187 scr_DrawRoster(); |
177 hlog_write_status(jid, 0, status, status_msg); | 188 hlog_write_status(jid, 0, status, status_msg); |
178 // External command | 189 // External command |