diff -ur centericq-4.20.0/src/hooks/jabberhook.cc /home/leitner/centericq-4.20.0/src/hooks/jabberhook.cc --- centericq-4.20.0/src/hooks/jabberhook.cc Thu Jan 27 00:52:48 2005 +++ /home/leitner/centericq-4.20.0/src/hooks/jabberhook.cc Wed Jul 13 16:30:20 2005 @@ -1365,11 +1365,16 @@ body = (string) xmlnode_get_data (x) + ": " + body; } - if(x = xmlnode_get_tag(packet->x, "x")) - if(p = xmlnode_get_attrib(x, "xmlns")) - if((string) p == "jabber:x:encrypted") - if(p = xmlnode_get_data(x)) - enc = p; + + for (x = xmlnode_get_firstchild(packet->x); x; x = xmlnode_get_nextsibling(x)) { + if ((p = xmlnode_get_name(x)) && !strcmp(p, "x")) + if ((p = xmlnode_get_attrib(x, "xmlns")) && + !strcasecmp(p, "jabber:x:encrypted")) + if ((p = xmlnode_get_data(x)) != NULL) { + enc = p; + break; + } + } if(!body.empty()) jhook.gotmessage(type, from, body, enc);