Mercurial > ~mikael > mcabber > hg
diff mcabber/src/jabglue.c @ 294:871e53769084
Allow one status message per Jabber status
Messages can be defined with the following options:
message (overrides any of the others),
message_avail,
message_free,
message_dnd,
message_notavail,
message_away
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 09 Jul 2005 12:44:57 +0100 |
parents | 4d7040cff8ee |
children | 35cda94e570d 12f919be3da5 |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Sat Jul 09 09:50:01 2005 +0100 +++ b/mcabber/src/jabglue.c Sat Jul 09 12:44:57 2005 +0100 @@ -29,6 +29,7 @@ #include "hooks.h" #include "utf8.h" #include "utils.h" +#include "settings.h" #define JABBERPORT 5222 #define JABBERSSLPORT 5223 @@ -226,7 +227,7 @@ return mystatus; } -void jb_setstatus(enum imstatus st, char *msg) +void jb_setstatus(enum imstatus st, const char *msg) { xmlnode x; @@ -274,10 +275,8 @@ strprio, (unsigned) -1); } - if (!msg) { - msg = ""; // FIXME - //msg = imstatus2str(st); - } + if (!msg) + msg = settings_get_status_msg(st); xmlnode_insert_cdata(xmlnode_insert_tag(x, "status"), msg, (unsigned) -1); @@ -434,7 +433,7 @@ //setautostatus(jhook.manualstatus); - jb_setstatus(available, "I'm here!"); // XXX not always "available"... + jb_setstatus(available, NULL); buddylist_build(); /* for (i = 0; i < clist.count; i++) {