Mercurial > hg
diff mcabber/src/jabglue.c @ 318:45076d02eeef
The /status command can specify a status message
We can now use: "/status dnd On the phone..."
Related change: Display the buddy status message when a buddy connects/changes
his/her status.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 15 Jul 2005 18:45:41 +0100 |
parents | 1d6b16d9c577 |
children | db45371106a5 |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Fri Jul 15 13:55:47 2005 +0100 +++ b/mcabber/src/jabglue.c Fri Jul 15 18:45:41 2005 +0100 @@ -311,7 +311,7 @@ if (mystatus == offline || st == offline) update_roster = TRUE; - hk_mystatuschange(0, mystatus, st); + hk_mystatuschange(0, mystatus, st, msg); mystatus = st; } @@ -611,6 +611,7 @@ void packethandler(jconn conn, jpacket packet) { char *p, *r; + const char *m; xmlnode x, y; char *from=NULL, *type=NULL, *body=NULL, *enc=NULL; char *ns=NULL; @@ -861,7 +862,10 @@ p = NULL; r = jidtodisp(from); - if (ust != roster_getstatus(r)) + m = roster_getstatusmsg(r); + // Call hk_statuschange() if status has changed or if the + // status message is different + if ((ust != roster_getstatus(r)) || (p && (!m || strcmp(p, m)))) hk_statuschange(r, 0, ust, p); g_free(r); break;