+/*
+ * Stupidly, XMPP does not specify a way to tell the client to flush its client-side roster
+ * and prepare to receive a new one. So instead we remember every buddy we've ever told the
+ * client about, and push delete operations out at the beginning of a session.
+ */
+void xmpp_delete_old_buddies_who_no_longer_exist_from_the_client_roster(void)
+{
+ long len;
+ void *Value;
+ const char *Key;
+ HashList *mortuary = xmpp_fetch_mortuary();
+ HashPos *HashPos = GetNewHashPos(mortuary, 0);
+
+ CtdlLogPrintf(CTDL_DEBUG, "\033[32mHAHA\033[0m\n");
+ while (GetNextHashPos(mortuary, HashPos, &len, &Key, &Value) != 0)
+ {
+ CtdlLogPrintf(CTDL_DEBUG, "\033[31mDELETE: %s\033[0m\n", (char *)Value);
+ }
+ CtdlLogPrintf(CTDL_DEBUG, "\033[32mHOHO\033[0m\n");
+ DeleteHashPos(&HashPos);
+ DeleteHash(&mortuary);
+}