[Tkabber-dev] r1559 - in trunk/tkabber-plugins: . browser floatinglog georoster receipts singularity tclchat traffic

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Oct 19 10:23:24 MSD 2008


Author: sergei
Date: 2008-10-19 10:23:24 +0400 (Sun, 19 Oct 2008)
New Revision: 1559

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/browser/browser.tcl
   trunk/tkabber-plugins/floatinglog/floatinglog.tcl
   trunk/tkabber-plugins/georoster/georoster.tcl
   trunk/tkabber-plugins/receipts/receipts.tcl
   trunk/tkabber-plugins/singularity/singularity.tcl
   trunk/tkabber-plugins/tclchat/tclchat_messages.tcl
   trunk/tkabber-plugins/traffic/traffic.tcl
Log:
	* browser/browser.tcl, floatinglog/floatinglog.tcl,
	  georoster/georoster.tcl, receipts/receipts.tcl,
	  singularity/singularity.tcl, tclchat/tclchat_messages.tcl,
	  traffic/traffic.tcl: Replaced JID related procedures from utils.tcl
	  (node_from_jid, server_from_jid, resource_from_jid,
	  node_and_server_from_jid, tolower_node_and_domain) by procedures from
	  xmpp::jid package (::xmpp::jid::node, ::xmpp::jid::server,
	  ::xmpp::jid::resource, ::xmpp::jid::stripResource,
	  ::xmpp::jid::normalize).


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/ChangeLog	2008-10-19 06:23:24 UTC (rev 1559)
@@ -1,3 +1,15 @@
+2008-10-19  Sergei Golovan <sgolovan at nes.ru>
+
+	* browser/browser.tcl, floatinglog/floatinglog.tcl,
+	  georoster/georoster.tcl, receipts/receipts.tcl,
+	  singularity/singularity.tcl, tclchat/tclchat_messages.tcl,
+	  traffic/traffic.tcl: Replaced JID related procedures from utils.tcl
+	  (node_from_jid, server_from_jid, resource_from_jid,
+	  node_and_server_from_jid, tolower_node_and_domain) by procedures from
+	  xmpp::jid package (::xmpp::jid::node, ::xmpp::jid::server,
+	  ::xmpp::jid::resource, ::xmpp::jid::stripResource,
+	  ::xmpp::jid::normalize).
+
 2008-10-18  Sergei Golovan <sgolovan at nes.ru>
 
 	* georoster/georoster.tcl: Fixed balloon text setting.

Modified: trunk/tkabber-plugins/browser/browser.tcl
===================================================================
--- trunk/tkabber-plugins/browser/browser.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/browser/browser.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -454,14 +454,14 @@
 menu $m -tearoff 0
 $m add command -label [::msgcat::mc "Join group..."] -command {
     join_group_dialog $::plugins::browser::browser(xlib,$::plugins::browser::headwindow) \
-	    -server [server_from_jid $::plugins::browser::headjid] \
-	    -group [node_from_jid $::plugins::browser::headjid]
+	    -server [::xmpp::jid::server $::plugins::browser::headjid] \
+	    -group [::xmpp::jid::node $::plugins::browser::headjid]
 }
 $m add command -label [::msgcat::mc "Add conference..."] -command {
     plugins::conferences::add_conference_dialog \
 	$::plugins::browser::browser(xlib,$::plugins::browser::headwindow) \
-	-group [node_from_jid $::plugins::browser::headjid] \
-	-server [server_from_jid $::plugins::browser::headjid]
+	-group [::xmpp::jid::node $::plugins::browser::headjid] \
+	-server [::xmpp::jid::server $::plugins::browser::headjid]
 }
 $m add separator
 $m add command -label [::msgcat::mc "Browse"] \

Modified: trunk/tkabber-plugins/floatinglog/floatinglog.tcl
===================================================================
--- trunk/tkabber-plugins/floatinglog/floatinglog.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/floatinglog/floatinglog.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -352,7 +352,7 @@
 		} ignore] && $ignore != ""} return
 		if {$options(show_only_personal)} {
 		    set chatid [chat::chatid $xlib \
-			[node_and_server_from_jid $from]]
+			[::xmpp::jid::stripResource $from]]
 		    set myjid [chat::our_jid $chatid]
 		    set mynick [chat::get_nick $xlib $myjid $type]
 		    if {![check_message $mynick $body]} return

Modified: trunk/tkabber-plugins/georoster/georoster.tcl
===================================================================
--- trunk/tkabber-plugins/georoster/georoster.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/georoster/georoster.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -398,7 +398,7 @@
 	set georoster(jids,$xlib) {}
     }
 
-    set jid [node_and_server_from_jid $from]
+    set jid [::xmpp::jid::stripResource $from]
     switch -- $type {
 	error -
 	subscribe -

Modified: trunk/tkabber-plugins/receipts/receipts.tcl
===================================================================
--- trunk/tkabber-plugins/receipts/receipts.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/receipts/receipts.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -58,7 +58,7 @@
 
     if {!$options(reply)} { return 0 }
     if {[string equal $type chat]} {
-	set chatid [chat::chatid $xlib [node_and_server_from_jid $from]]
+	set chatid [chat::chatid $xlib [::xmpp::jid::stripResource $from]]
 	if {[chat::is_groupchat $chatid]} { return 1 }
     }
     return [roster::is_trusted $xlib $from]

Modified: trunk/tkabber-plugins/singularity/singularity.tcl
===================================================================
--- trunk/tkabber-plugins/singularity/singularity.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/singularity/singularity.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -43,7 +43,7 @@
     if {!$options(enabled) || ![string equal $type chat]} return
 
     set from [chat::get_jid $chatid]
-    set barejid [node_and_server_from_jid $from]
+    set barejid [::xmpp::jid::stripResource $from]
     if {[chat::is_groupchat [chat::chatid \
 	[chat::get_xlib $chatid] $barejid]]} return
 
@@ -58,7 +58,7 @@
     foreach cid [chat::opened] {
 	set jid [chat::get_jid $cid]
 	if {![string equal $from $jid] &&
-		[string equal $barejid [node_and_server_from_jid $jid]]} {
+		[string equal $barejid [::xmpp::jid::stripResource $jid]]} {
 	    if {$savedinput != ""} { append savedinput \n }
 	    append savedinput [[chat::input_win $cid] get 1.0 end-1c]
 	    set savedhistory [concat $savedhistory $history(stack,$cid)]

Modified: trunk/tkabber-plugins/tclchat/tclchat_messages.tcl
===================================================================
--- trunk/tkabber-plugins/tclchat/tclchat_messages.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/tclchat/tclchat_messages.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -53,7 +53,7 @@
     if {![info exists tmp(-to)]} return
 
     set to $tmp(-to)
-    set group [node_and_server_from_jid $to]
+    set group [::xmpp::jid::stripResource $to]
 
     # If the presence doesn't go to Tclers' chat, do nothing
     if {![cequal $group $options(tclers_chat_jid)]} return
@@ -141,7 +141,7 @@
     # Filter groupchat messages only
     if {![cequal $type groupchat]} return
 
-    set group [node_and_server_from_jid $from]
+    set group [::xmpp::jid::stripResource $from]
 
     set chatid [chat::chatid $xlib $group]
 

Modified: trunk/tkabber-plugins/traffic/traffic.tcl
===================================================================
--- trunk/tkabber-plugins/traffic/traffic.tcl	2008-10-18 20:17:39 UTC (rev 1558)
+++ trunk/tkabber-plugins/traffic/traffic.tcl	2008-10-19 06:23:24 UTC (rev 1559)
@@ -63,7 +63,7 @@
     if {[cequal $jid ""]} {
 	set jid "SERVER"
     } else {
-	catch { set jid [node_and_server_from_jid $jid] }
+	catch { set jid [::xmpp::jid::stripResource $jid] }
     }
 
     if {![info exists jids($xlib,$jid)]} {



More information about the Tkabber-dev mailing list