[ekg2-commit] ekg2: jabber_handlers.c (HEAD) [darkjames]
CVS commit
cvs w toxygen.net
Czw, 3 Maj 2007, 02:11:27 CEST
Module name: ekg2
Changes by: darkjames 2007-05-03 02:11:25
Modified files:
jabber_handlers.c
Log message:
tlen send smth like this:
02:11:58 [jabber] (101b/101b) recv: <iq type='set'><query xmlns='jabber:iq:roster'><item jid='ktos' subscription='remove' /></query></iq>
item jid=... without @tlen.pl so hack it.
Index: jabber_handlers.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber_handlers.c,v
diff -d -u -r1.103 -r1.104
--- jabber_handlers.c 3 May 2007 00:07:15 -0000 1.103
+++ jabber_handlers.c 3 May 2007 00:11:25 -0000 1.104
@@ -2433,10 +2433,14 @@
xmlnode_t *item = xmlnode_find_child(q, "item");
for (; item ; item = item->next) {
+ const char *jid = jabber_attr(item->atts, "jid");
userlist_t *u;
char *uid;
- if (j->istlen) uid = saprintf("tlen:%s", jabber_attr(item->atts, "jid"));
- else uid = saprintf("jid:%s",jabber_attr(item->atts, "jid"));
+
+ if (j->istlen) {
+ if (xstrstr(jid, "@tlen.pl")) uid = saprintf("tlen:%s", jid);
+ else uid = saprintf("tlen:%s w tlen.pl", jid); /* fast hack */
+ } else uid = saprintf("jid:%s", jid);
/* jeśli element rostera ma subscription = remove to tak naprawde użytkownik jest usuwany;
w przeciwnym wypadku - nalezy go dopisać do userlisty; dodatkowo, jesli uzytkownika
Więcej informacji o liście dyskusyjnej ekg2-commit