[ekg2-commit] ekg2: commands.c (HEAD) jabber.c (HEAD) [peres]
CVS commit
cvs w toxygen.net
Pon, 8 Paź 2007, 09:42:29 CEST
Module name: ekg2
Changes by: peres 2007-10-08 09:42:27
Modified files:
commands.c jabber.c
Log message:
Use PROTOCOL_DISCONNECTING for <gone/> chatstate (disabling composing),
instead of worrying about it ourself.
Index: commands.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/commands.c,v
diff -d -u -r1.202 -r1.203
--- commands.c 6 Oct 2007 17:12:06 -0000 1.202
+++ commands.c 8 Oct 2007 07:42:26 -0000 1.203
@@ -377,6 +377,7 @@
/* w libtlenie jest <show>unavailable</show> + eskejpiete tlen_encode() */
if (session->connected) {
+#if 0
char *lt = session_get(session, "__last_typing");
if (lt)
@@ -384,6 +385,15 @@
"<x xmlns=\"jabber:x:event\"/>"
"<gone xmlns=\"http://jabber.org/protocol/chatstates\"/>"
"</message>\n", lt);
+#endif
+
+ {
+ char *__session = xstrdup(session_uid_get(session));
+
+ query_emit_id(NULL, PROTOCOL_DISCONNECTING, &__session);
+
+ xfree(__session);
+ }
if (descr) {
char *tmp = jabber_escape(descr);
@@ -586,10 +596,10 @@
}
if (!j->istlen)
- watch_write(j->send_watch, "<x xmlns=\"jabber:x:event\">%s%s<displayed/><composing/></x>"
- "<active xmlns=\"http://jabber.org/protocol/chatstates\"/>",
+ watch_write(j->send_watch, "<x xmlns=\"jabber:x:event\">%s%s<displayed/><composing/></x>",
( config_display_ack & 1 ? "<delivered/>" : ""), /* ? */
- ( config_display_ack & 2 ? "<offline/>" : "") /* ? */);
+ ( config_display_ack & 2 ? "<offline/>" : ""), /* ? */
+ ( chat ? "<active xmlns=\"http://jabber.org/protocol/chatstates\"/>" : ""));
watch_write(j->send_watch, "</message>");
JABBER_COMMIT_DATA(j->send_watch);
Index: jabber.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/jabber.c,v
diff -d -u -r1.349 -r1.350
--- jabber.c 16 Sep 2007 20:50:29 -0000 1.349
+++ jabber.c 8 Oct 2007 07:42:27 -0000 1.350
@@ -1517,9 +1517,9 @@
first == 3 ? "gone" :
first == 2 ? "inactive" :
"paused"));
-
+#if 0
session_set(s, "__last_typing", len ? jid : NULL);
-
+#endif
return -1;
}
Więcej informacji o liście dyskusyjnej ekg2-commit