From: Art Cancro Date: Fri, 30 Nov 2007 05:09:00 +0000 (+0000) Subject: Strip leading and trailing whitespace from instant messages before sending them to... X-Git-Tag: v7.86~2732 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=0a1e8f39d1e1d65d1d7811b3cbc641fcf47c04c8;p=citadel.git Strip leading and trailing whitespace from instant messages before sending them to Jabber clients --- diff --git a/citadel/modules/jabber/xmpp_messages.c b/citadel/modules/jabber/xmpp_messages.c index 046f7586a..d81e115d3 100644 --- a/citadel/modules/jabber/xmpp_messages.c +++ b/citadel/modules/jabber/xmpp_messages.c @@ -69,11 +69,9 @@ void jabber_output_incoming_messages(void) { */ cprintf("", XMPP->client_jid); if (ptr->text != NULL) { - cprintf(""); - memfmout(ptr->text, 0, "\n"); - if (ptr->text[strlen(ptr->text)-1] != '\n') cprintf("\n"); + striplt(ptr->text); + cprintf("%s", ptr->text); free(ptr->text); - cprintf(""); } cprintf(""); free(ptr); diff --git a/citadel/modules/jabber/xmpp_query_namespace.c b/citadel/modules/jabber/xmpp_query_namespace.c index 995cc5381..30b8d1680 100644 --- a/citadel/modules/jabber/xmpp_query_namespace.c +++ b/citadel/modules/jabber/xmpp_query_namespace.c @@ -92,8 +92,7 @@ xmpp_query_namespace(purple5b5c1e5a, , vcard-temp:query) void xmpp_query_namespace(char *iq_id, char *iq_from, char *iq_to, char *query_xmlns) { - lprintf(CTDL_DEBUG, "xmpp_query_namespace(%s, %s, %s, %s)\n", - iq_id, iq_from, iq_to, query_xmlns); + lprintf(CTDL_DEBUG, "xmpp_query_namespace(%s, %s, %s, %s)\n", iq_id, iq_from, iq_to, query_xmlns); /* * Beginning of query result.