[Tkabber-dev] r1581 - in trunk/tkabber: . plugins/chat

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Oct 25 00:17:48 MSD 2008


Author: sergei
Date: 2008-10-25 00:17:47 +0400 (Sat, 25 Oct 2008)
New Revision: 1581

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/chat/send_message.tcl
Log:
	* plugins/chat/send_message.tcl: Use generated unique packet IDs
	  instead of predictable increasing ones.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-10-24 18:42:08 UTC (rev 1580)
+++ trunk/tkabber/ChangeLog	2008-10-24 20:17:47 UTC (rev 1581)
@@ -1,3 +1,8 @@
+2008-10-25  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/chat/send_message.tcl: Use generated unique packet IDs
+	  instead of predictable increasing ones.
+
 2008-10-24  Sergei Golovan  <sgolovan at nes.ru>
 
 	* gpgme.tcl, ifacetk/iface.tcl, ifacetk/iroster.tcl, login.tcl,

Modified: trunk/tkabber/plugins/chat/send_message.tcl
===================================================================
--- trunk/tkabber/plugins/chat/send_message.tcl	2008-10-24 18:42:08 UTC (rev 1580)
+++ trunk/tkabber/plugins/chat/send_message.tcl	2008-10-24 20:17:47 UTC (rev 1581)
@@ -1,20 +1,13 @@
 # $Id$
 
 proc send_message {chatid user body type} {
-    global chat_msg_id
-
-    if {![info exists chat_msg_id]} {
-	set chat_msg_id 1
-    } else {
-	incr chat_msg_id
-    }
     set xlib [chat::get_xlib $chatid]
     set jid [chat::get_jid $chatid]
     set chatw [chat::chat_win $chatid]
 
     if {[hook::is_flag chat_send_message_hook send]} {
 	set command [list message::send_msg $xlib $jid \
-			 -id $chat_msg_id \
+			 -id [::xmpp::packetID $xlib] \
 			 -type $type \
 			 -body $body]
 	if {[info exists ::chat::chats(thread,$chatid)]} {



More information about the Tkabber-dev mailing list