[Tkabber-dev] r288 - trunk/plugins/openhistory

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Feb 7 02:38:05 MSK 2010


Author: asv
Date: 2010-02-07 02:38:05 +0300 (Sun, 07 Feb 2010)
New Revision: 288

Modified:
   trunk/plugins/openhistory/openhistory.tcl
Log:
fixed groupchat private bug


Modified: trunk/plugins/openhistory/openhistory.tcl
===================================================================
--- trunk/plugins/openhistory/openhistory.tcl	2010-02-06 06:25:23 UTC (rev 287)
+++ trunk/plugins/openhistory/openhistory.tcl	2010-02-06 23:38:05 UTC (rev 288)
@@ -14,22 +14,24 @@
     } else return
 
     set user [lindex [split $body] 1]
-    set connid [chat::get_xlib $chatid]
+    set connid [::chat::get_xlib $chatid]
+    set jid _
 
     if {![string length $user]} {
-        set jid [xmpp::jid::stripResource [chat::get_jid $chatid]]
+        set xlib [::chat::get_xlib $chatid]
+        set jid [::xmpp::jid::stripResource [::chat::get_jid $chatid]]
+        set groupid [::chat::chatid $xlib $jid]
 
-        ::logger::show_log $jid -connection $connid
-        return stop
-    }
-
-    if {[string first "@" $user] >= 0} {
-        ::logger::show_log $user -connection $connid
+        if {[::chat::is_groupchat $groupid]} {
+            set jid [::chat::get_jid $chatid]
+        }
+    } elseif {[string first "@" $user] >= 0} {
+        set jid $user
     } else {
-        ::logger::show_log [chat::get_jid $chatid]/$user \
-            -connection $connid
+        set jid [::chat::get_jid $chatid]/$user
     }
 
+    ::logger::show_log $jid -connection $connid
     return stop
 }
 
@@ -58,3 +60,5 @@
     }
 
 }
+
+# vim:ft=tcl:ts=8:sw=4:sts=4:et



More information about the Tkabber-dev mailing list