/*
* Handle messages sent and received using XMPP (Jabber) protocol
*
- * Copyright (c) 2007-2010 by Art Cancro
+ * Copyright (c) 2007-2014 by Art Cancro
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
- *
- *
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- *
- *
- *
- *
*/
#include "sysdep.h"
XMPP->message_to[0] = 0;
time(&CCC->lastidle);
}
+
+
void xmpp_end_message(void *data, const char *supplied_el, const char **attr)
{
+ safestrncpy(XMPP->message_to, ChrPtr(XMPP->Message.to), sizeof(XMPP->message_to));
xmpp_send_message(XMPP->message_to, XMPP->message_body);
XMPP->html_tag_level = 0;
}
/*
* Handle XMPP presence exchanges
*
- * Copyright (c) 2007-2010 by Art Cancro
+ * Copyright (c) 2007-2014 by Art Cancro
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "serv_xmpp.h"
-
/*
* Indicate the presence of another user to the client
* (used in several places)
void xmpp_indicate_presence(char *presence_jid)
{
XPrint(HKEY("presence"),
- XPROPERTY("from", presence_jid, strlen(presence_jid)),
- XPROPERTY("to", XMPP->client_jid, strlen(XMPP->client_jid)),
- TYPE_ARGEND);
+ XCLOSED,
+ XPROPERTY("from", presence_jid, strlen(presence_jid)),
+ XPROPERTY("to", XMPP->client_jid, strlen(XMPP->client_jid)),
+ TYPE_ARGEND
+ );
}
-
/*
* Convenience function to determine whether any given session is 'visible' to any other given session,
* and is capable of receiving instant messages from that session.
/*
* Handle <iq> <get> <query> type situations (namespace queries)
*
- * Copyright (c) 2007-2009 by Art Cancro
+ * Copyright (c) 2007-2014 by Art Cancro
*
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- *
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- *
- *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
#include "sysdep.h"
*/
void xmpp_roster_item(struct CitContext *cptr)
{
- struct CitContext *CCC=CC;
-
XPrint(HKEY("item"), 0,
- XCPROPERTY("subscription", "both"),
- XPROPERTY("jid", CCC->cs_inet_email, strlen(CCC->cs_inet_email)),
- XPROPERTY("name", cptr->user.fullname, strlen(cptr->user.fullname)),
- TYPE_ARGEND);
+ XCPROPERTY("subscription", "both"),
+ XPROPERTY("jid", cptr->cs_inet_email, strlen(cptr->cs_inet_email)),
+ XPROPERTY("name", cptr->user.fullname, strlen(cptr->user.fullname)),
+ TYPE_ARGEND
+ );
XPrint(HKEY("group"), XCLOSED,
XCFGBODY(c_humannode),
AC_REPLACE_FUNCS(snprintf)
AC_CHECK_HEADER(CUnit/CUnit.h, [AC_DEFINE(ENABLE_TESTS, [], [whether we should compile the test-suite])])
-AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h iconv.h xlocale.h)
+AC_CHECK_HEADERS(fcntl.h limits.h unistd.h iconv.h xlocale.h)
dnl Checks for the zlib compression library.
saved_CFLAGS="$CFLAGS"
/*
* WebCit "system dependent" code.
*
- * Copyright (c) 1996-2012 by the citadel.org team
+ * Copyright (c) 1996-2014 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3.
#include <sys/socket.h>
#include <syslog.h>
#include <sys/syslog.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
+#include <time.h>
#include <limits.h>
#include <sys/resource.h>
#include <netinet/in.h>
/*
- * Copyright (c) 1987-2013 by the citadel.org team
+ * Copyright (c) 1987-2014 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 3.
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
#include <sys/stat.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>