[Tkabber-dev] r1530 - in trunk/tkabber-plugins: . bc browser presencecmd quiz singularity socials spy

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Oct 17 23:02:11 MSD 2008


Author: sergei
Date: 2008-10-17 23:02:11 +0400 (Fri, 17 Oct 2008)
New Revision: 1530

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/bc/bc.tcl
   trunk/tkabber-plugins/browser/browser.tcl
   trunk/tkabber-plugins/presencecmd/presencecmd.tcl
   trunk/tkabber-plugins/quiz/quiz.tcl
   trunk/tkabber-plugins/singularity/singularity.tcl
   trunk/tkabber-plugins/socials/socials.tcl
   trunk/tkabber-plugins/spy/spy.tcl
Log:
	* bc/bc.tcl, browser/browser.tcl, presencecmd/presencecmd.tcl,
	  quiz/quiz.tcl, singularity/singularity.tcl, socials/socials.tcl,
	  spy/spy.tcl: Fixed connections notation.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/ChangeLog	2008-10-17 19:02:11 UTC (rev 1530)
@@ -5,6 +5,10 @@
 	* *: Massive update caused by moving to an external XMPP library
 	  TclXMPP (http://code.google.com/p/tclxmpp/).
 
+	* bc/bc.tcl, browser/browser.tcl, presencecmd/presencecmd.tcl,
+	  quiz/quiz.tcl, singularity/singularity.tcl, socials/socials.tcl,
+	  spy/spy.tcl: Fixed connections notation.
+
 2008-10-15  Sergei Golovan <sgolovan at nes.ru>
 
 	* quotelastmsg/*, singularity/*, stripes/*: Added three new plugins

Modified: trunk/tkabber-plugins/bc/bc.tcl
===================================================================
--- trunk/tkabber-plugins/bc/bc.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/bc/bc.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -96,7 +96,7 @@
     [namespace current]::bc::handle_commands 50
 
 proc bc::get_nick {chatid jid type} {
-    if {[catch {chat::get_nick [chat::get_connid $chatid] $jid $type} nick]} {
+    if {[catch {chat::get_nick [chat::get_xlib $chatid] $jid $type} nick]} {
 	return [chat::get_nick $jid $type]
     } else {
 	return $nick
@@ -110,7 +110,7 @@
     variable attempts
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set jid [chat::get_jid $chatid]
 
     set s [string trim $body]
@@ -144,11 +144,10 @@
 		incr attempts($chatid,$from)
 		set at $attempts($chatid,$from)
 
-		message::send_msg $jid -type groupchat \
+		message::send_msg $xlib $jid -type groupchat \
 		    -body "$nick: ${prefix}íÏÌÏÄÅÃ! úÁÄÕÍÁÎÎÏÅ ÓÌÏ×Ï\
 			   \"$word($chatid,$from)\" ÂÙÌÏ ÏÔÇÁÄÁÎÏ ÚÁ $at\
-			   [lindex {. ÐÏÐÙÔËÕ ÐÏÐÙÔËÉ ÐÏÐÙÔÏË} [numgrp $at]]." \
-		    -connection $connid
+			   [lindex {. ÐÏÐÙÔËÕ ÐÏÐÙÔËÉ ÐÏÐÙÔÏË} [numgrp $at]]."
 
 		add_score $chatid $nick $ww $at
 		unset word($chatid,$from)
@@ -156,9 +155,8 @@
 		return
 	    }
 	    if {[lsearch -exact $words $w] == -1} {
-		message::send_msg $jid -type groupchat \
-		    -body "$nick: ${prefix}ñ ÎÅ ÚÎÁÀ ÓÌÏ×Á \"$w\"." \
-		    -connection $connid
+		message::send_msg $xlib $jid -type groupchat \
+		    -body "$nick: ${prefix}ñ ÎÅ ÚÎÁÀ ÓÌÏ×Á \"$w\"."
 		return
 	    }
 	    set l [string length $w]
@@ -171,9 +169,8 @@
 	    } else {
 		set attempts($chatid,$from) 1
 	    }
-	    message::send_msg $jid -type groupchat \
-		-body "$nick: ${prefix} $w: $matches" \
-		-connection $connid
+	    message::send_msg $xlib $jid -type groupchat \
+		-body "$nick: ${prefix} $w: $matches"
 	}
     }
 }
@@ -184,15 +181,14 @@
     variable game
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set jid [chat::get_jid $chatid]
 
     if {![info exists game($chatid)]} {
 	set game($chatid) ""
-	message::send_msg $jid -type groupchat \
+	message::send_msg $xlib $jid -type groupchat \
 	    -body "${prefix}äÏÂÒÏ ÐÏÖÁÌÏ×ÁÔØ ÎÁ ÉÇÒÕ \"ïÔÇÁÄÁÊ ÓÌÏ×Ï\"!\
-		   þÔÏÂÙ ÕÚÎÁÔØ ÐÒÁ×ÉÌÁ ÉÇÒÙ, ××ÅÄÉÔÅ !bcrules." \
-	    -connection $connid
+		   þÔÏÂÙ ÕÚÎÁÔØ ÐÒÁ×ÉÌÁ ÉÇÒÙ, ××ÅÄÉÔÅ !bcrules."
     } else {
 	chat::add_message $chatid $jid error "éÇÒÁ ÕÖÅ ÚÁÐÕÝÅÎÁ" {}
     }
@@ -204,7 +200,7 @@
     variable attempts
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set jid [chat::get_jid $chatid]
 
     if {[info exists game($chatid)]} {
@@ -215,9 +211,8 @@
 	    unset attempts($n)
 	}
 	unset game($chatid)
-	message::send_msg $jid -type groupchat \
-	    -body "${prefix}éÇÒÁ ÏÓÔÁÎÏ×ÌÅÎÁ." \
-	    -connection $connid
+	message::send_msg $xlib $jid -type groupchat \
+	    -body "${prefix}éÇÒÁ ÏÓÔÁÎÏ×ÌÅÎÁ."
 	top $chatid
     } else {
 	chat::add_message $chatid $jid error "éÇÒÁ ÎÅ ÚÁÐÕÝÅÎÁ" {}
@@ -229,15 +224,14 @@
     variable word
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set jid1 [chat::get_jid $chatid]
 
     if {[info exists game($chatid)]} {
 	if {[info exists word($chatid,$jid)]} {
 	    set nick [get_nick $chatid $jid $type]
-	    message::send_msg $jid1 -type $type \
-		-body "$nick: ${prefix}ðÒÅÄÙÄÕÝÅÅ ÓÌÏ×Ï: $word($chatid,$jid)." \
-		-connection $connid
+	    message::send_msg $xlib $jid1 -type $type \
+		-body "$nick: ${prefix}ðÒÅÄÙÄÕÝÅÅ ÓÌÏ×Ï: $word($chatid,$jid)."
 	}
 	
 	catch {unset word($chatid.$jid)}
@@ -253,7 +247,7 @@
     variable attempts
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set jid1 [chat::get_jid $chatid]
 
     after cancel [list [namespace current]::ask $chatid $jid]
@@ -261,9 +255,8 @@
     set word($chatid,$jid) [get_question]
     set attempts($chatid,$jid) 0
     set nick [get_nick $chatid $jid groupchat]
-    message::send_msg $jid1 -type groupchat \
-	-body "$nick: ${prefix}óÌÏ×Ï ÚÁÇÁÄÁÎÏ. õÇÁÄÙ×ÁÊ." \
-	-connection $connid
+    message::send_msg $xlib $jid1 -type groupchat \
+	-body "$nick: ${prefix}óÌÏ×Ï ÚÁÇÁÄÁÎÏ. õÇÁÄÙ×ÁÊ."
 }
 
 
@@ -291,7 +284,7 @@
     variable top
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set jid [chat::get_jid $chatid]
 
     if {[info exists top($chatid)]} {
@@ -303,10 +296,8 @@
 	    append ts "$score\t$word\t$nick\n"
 	}
 
-	message::send_msg $jid -type groupchat \
-	    -body "${prefix}Top scores:\n$ts" \
-	    -connection $connid
-	
+	message::send_msg $xlib $jid -type groupchat \
+	    -body "${prefix}Top scores:\n$ts"
     } else {
 	chat::add_message $chatid $jid error "îÅÔ ÄÁÎÎÙÈ Ï top scores" {}
     }
@@ -341,10 +332,10 @@
 proc bc::printrules {chatid to} {
     variable game
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
 
     if {[info exists game($chatid)]} {
-	message::send_msg $to -type chat \
+	message::send_msg $xlib $to -type chat \
 	    -body "ðÒÁ×ÉÌÁ ÉÇÒÙ \"ïÔÇÁÄÁÊ ÓÌÏ×Ï\"\n\
 1) ÷ÏÄÑÝÉÊ (ÂÏÔ) ÚÁÇÁÄÙ×ÁÅÔ ÐÑÔÉÂÕË×ÅÎÎÏÅ ÓÌÏ×Ï\
 (ÎÁÒÉÃÁÔÅÌØÎÏÅ ÓÕÝÅÓÔ×ÉÔÅÌØÎÏÅ ÅÄÉÎÓÔ×ÅÎÎÏÇÏ ÞÉÓÌÁ) × ËÏÔÏÒÏÍ\
@@ -355,8 +346,7 @@
 × ÎÁÚ×ÁÎÎÏÍ.\n\
 3) åÓÌÉ ÓÌÏ×Ï ÕÇÁÄÁÎÏ, ÔÏ ÉÇÒÁ ÚÁËÁÎÞÉ×ÁÅÔÓÑ.\n\
 \n\
-äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÚÁÐÕÓÔÉÔØ ÉÇÒÕ, ×ÅÒÎÉÔÅÓØ × ËÏÎÆÅÒÅÎÃÉÀ É ÎÁÂÅÒÉÔÅ !bcstart" \
-	    -connection $connid
+äÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÚÁÐÕÓÔÉÔØ ÉÇÒÕ, ×ÅÒÎÉÔÅÓØ × ËÏÎÆÅÒÅÎÃÉÀ É ÎÁÂÅÒÉÔÅ !bcstart"
     }
 }
 

Modified: trunk/tkabber-plugins/browser/browser.tcl
===================================================================
--- trunk/tkabber-plugins/browser/browser.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/browser/browser.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -453,15 +453,15 @@
 }
 menu $m -tearoff 0
 $m add command -label [::msgcat::mc "Join group..."] -command {
-    join_group_dialog -server [server_from_jid $::plugins::browser::headjid] \
-	    -group [node_from_jid $::plugins::browser::headjid] \
-	    -connection $::plugins::browser::browser(xlib,$::plugins::browser::headwindow)
+    join_group_dialog $::plugins::browser::browser(xlib,$::plugins::browser::headwindow) \
+	    -server [server_from_jid $::plugins::browser::headjid] \
+	    -group [node_from_jid $::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] \
-	-connection $::plugins::browser::browser(xlib,$::plugins::browser::headwindow)
+	-server [server_from_jid $::plugins::browser::headjid]
 }
 $m add separator
 $m add command -label [::msgcat::mc "Browse"] \

Modified: trunk/tkabber-plugins/presencecmd/presencecmd.tcl
===================================================================
--- trunk/tkabber-plugins/presencecmd/presencecmd.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/presencecmd/presencecmd.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -100,10 +100,9 @@
 proc presencecmd::send_directed_presence {chatid pres status sendstatus} {
     global userpriority
 
-    set cmd [list send_presence $pres \
+    set cmd [list send_presence [chat::get_xlib $chatid] $pres \
 		      -to [chat::get_jid $chatid] \
-		      -priority $userpriority \
-		      -connection [chat::get_connid $chatid]]
+		      -priority $userpriority]
 
     if {$sendstatus} {
 	lappend cmd -status $status

Modified: trunk/tkabber-plugins/quiz/quiz.tcl
===================================================================
--- trunk/tkabber-plugins/quiz/quiz.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/quiz/quiz.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -112,7 +112,7 @@
     variable asktime
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     set s [string trim $body]
@@ -135,7 +135,7 @@
 	default {
 	    if {[filter $body] == [filter $answer($chatid)]} {
 		set time [expr [clock seconds] - $asktime($chatid)]
-		if {[catch { chat::get_nick $connid $from $type } nick]} {
+		if {[catch { chat::get_nick $xlib $from $type } nick]} {
 		    set nick [chat::get_nick $from $type]
 		}
 		set msg_time ""
@@ -168,18 +168,16 @@
 		    set stats(quick,$chatid) $time
 		}
 
-		message::send_msg $group -type groupchat \
+		message::send_msg $xlib $group -type groupchat \
 		    -body "${prefix}íÏÌÏÄÅÃ, $nick!  ðÒÁ×ÉÌØÎÙÊ\
 ÏÔ×ÅÔ \"$answer($chatid)\" ÂÙÌ ÄÁÎ ÚÁ $time [lindex {. ÓÅËÕÎÄÕ ÓÅËÕÎÄÙ \
 ÓÅËÕÎÄ} [numgrp $time]]$msg_time\
 É ÐÒÉÎ£Ó ÔÅÂÅ $points($chatid) [lindex {. ÏÞËÏ ÏÞËÁ ÏÞËÏ×} [numgrp \
-$points($chatid)]]." \
-		    -connection $connid
+$points($chatid)]]."
 
 		if {[info exists msg_cont]} {
-		    message::send_msg $group -type groupchat \
-			-body $msg_cont \
-			-connection $connid
+		    message::send_msg $xlib $group -type groupchat \
+			-body $msg_cont
 		}
 
 		add_score $chatid $nick $points($chatid) $time
@@ -199,14 +197,13 @@
     variable game
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     if {![info exists game($chatid)]} {
 	set game($chatid) ""
-	message::send_msg $group -type groupchat \
-	    -body "${prefix}äÏÂÒÏ ÐÏÖÁÌÏ×ÁÔØ ÎÁ ÎÁÛÕ ×ÉËÔÏÒÉÎÕ! îÁÞÉÎÁÅÍ ÉÇÒÕ." \
-	    -connection $connid
+	message::send_msg $xlib $group -type groupchat \
+	    -body "${prefix}äÏÂÒÏ ÐÏÖÁÌÏ×ÁÔØ ÎÁ ÎÁÛÕ ×ÉËÔÏÒÉÎÕ! îÁÞÉÎÁÅÍ ÉÇÒÕ."
 	variable lost
 	set lost($chatid) 0
 	next $chatid
@@ -220,7 +217,7 @@
     variable question
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     if {[info exists game($chatid)]} {
@@ -232,9 +229,8 @@
 	catch { unset question($chatid) }
 	catch { unset answer($chatid) }
 	unset game($chatid)
-	message::send_msg $group -type groupchat \
-	    -body "${prefix}÷ÉËÔÏÒÉÎÁ ÏÓÔÁÎÏ×ÌÅÎÁ." \
-	    -connection $connid
+	message::send_msg $xlib $group -type groupchat \
+	    -body "${prefix}÷ÉËÔÏÒÉÎÁ ÏÓÔÁÎÏ×ÌÅÎÁ."
 	top $chatid
     } else {
 	chat::add_message $chatid $group error "÷ÉËÔÏÒÉÎÁ ÎÅ ÚÁÐÕÝÅÎÁ" {}
@@ -248,7 +244,7 @@
     variable hint
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     after cancel [list [namespace current]::ask $chatid]
@@ -261,10 +257,9 @@
 	    variable lost
 	    incr lost($chatid)
 	    if {$lost($chatid) > 4} {
-		message::send_msg $group -type groupchat \
+		message::send_msg $xlib $group -type groupchat \
 		    -body "${prefix}îÕ ÎÅ ÈÏÔÉÔÅ ÐÒÁ×ÉÌØÎÏ ÏÔ×ÅÞÁÔØ\
-			   -- É ÎÅ ÎÁÄÏ :-/" \
-		    -connection $connid
+			   -- É ÎÅ ÎÁÄÏ :-/"
 		stop $chatid
 		return
 	    }
@@ -273,10 +268,9 @@
 	    catch { unset last(nick,$chatid) }
 	    catch { unset last(num,$chatid) }
 
-	    message::send_msg $group -type groupchat \
+	    message::send_msg $xlib $group -type groupchat \
 		-body "${prefix}îÉËÔÏ ÎÅ ÏÔ×ÅÔÉÌ ÎÁ ×ÏÐÒÏÓ, ÓÌÅÄÕÀÝÉÊ ÞÅÒÅÚ\
-		       5 ÓÅËÕÎÄ. ðÒÁ×ÉÌØÎÙÊ ÏÔ×ÅÔ \"$answer($chatid)\"." \
-		-connection $connid
+		       5 ÓÅËÕÎÄ. ðÒÁ×ÉÌØÎÙÊ ÏÔ×ÅÔ \"$answer($chatid)\"."
 	}
 	
 	catch { unset question($chatid) }
@@ -296,7 +290,7 @@
     variable asktime
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     after cancel [list [namespace current]::ask $chatid]
@@ -305,9 +299,8 @@
     lassign [get_question] question($chatid) answer($chatid)
     set points($chatid) 3
     set asktime($chatid) [clock seconds]
-    message::send_msg $group -type groupchat \
-	-body "${prefix}$question($chatid)" \
-	-connection $connid
+    message::send_msg $xlib $group -type groupchat \
+	-body "${prefix}$question($chatid)"
 
     after 60000 [list [namespace current]::next $chatid]
 }
@@ -320,7 +313,7 @@
     variable points
     variable prefix
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     if {![info exists game($chatid)] || \
@@ -334,10 +327,9 @@
 	return
     }
 
-    message::send_msg $group -type groupchat \
+    message::send_msg $xlib $group -type groupchat \
 	-body "${prefix}ðÏÄÓËÁÚËÁ: [crange $answer($chatid) \
-	       0 [expr 3 - $points($chatid)]]...?" \
-	-connection $connid
+	       0 [expr 3 - $points($chatid)]]...?"
     
     after 20000 [list [namespace current]::hint $chatid 1]
 }
@@ -368,7 +360,7 @@
     variable prefix
     variable stats
 
-    set connid [chat::get_connid $chatid]
+    set xlib [chat::get_xlib $chatid]
     set group [chat::get_jid $chatid]
 
     if {[info exists top($chatid)]} {
@@ -386,10 +378,9 @@
 	    append ts "$score\t$avgp\t$answ\t$quick\t$avgt\t$nick\n"
 	}
 
-	message::send_msg $group -type groupchat \
+	message::send_msg $xlib $group -type groupchat \
 	    -body "${prefix}Top scores:
-points\tavg p\tansw\tmin t\tavg t\tnick\n$ts" \
-	    -connection $connid
+points\tavg p\tansw\tmin t\tavg t\tnick\n$ts"
     } else {
 	chat::add_message $chatid $group error "îÅÔ ÄÁÎÎÙÈ Ï top scores" {}
     }

Modified: trunk/tkabber-plugins/singularity/singularity.tcl
===================================================================
--- trunk/tkabber-plugins/singularity/singularity.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/singularity/singularity.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -45,7 +45,7 @@
     set from [chat::get_jid $chatid]
     set barejid [node_and_server_from_jid $from]
     if {[chat::is_groupchat [chat::chatid \
-	[chat::get_connid $chatid] $barejid]]} return
+	[chat::get_xlib $chatid] $barejid]]} return
 
     variable contexts
     upvar 0 contexts(input,$chatid) savedinput

Modified: trunk/tkabber-plugins/socials/socials.tcl
===================================================================
--- trunk/tkabber-plugins/socials/socials.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/socials/socials.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -115,8 +115,8 @@
 
     if {[lcontain $social_list $command]} {
 	set our_jid [chat::our_jid $chatid]
-	set connid [chat::get_connid $chatid]
-	if {[catch {chat::get_nick $connid $our_jid groupchat} from]} {
+	set xlib [chat::get_xlib $chatid]
+	if {[catch {chat::get_nick $xlib $our_jid groupchat} from]} {
 	    set from [chat::get_nick $our_jid groupchat]
 	}
 	if {$to == $from} {

Modified: trunk/tkabber-plugins/spy/spy.tcl
===================================================================
--- trunk/tkabber-plugins/spy/spy.tcl	2008-10-17 18:52:11 UTC (rev 1529)
+++ trunk/tkabber-plugins/spy/spy.tcl	2008-10-17 19:02:11 UTC (rev 1530)
@@ -174,7 +174,7 @@
     destroy $w
 }
 
-proc spy::update_watch {connid watch_id nick jid type reason} {
+proc spy::update_watch {xlib watch_id nick jid type reason} {
     variable options
     variable spy_alerts
     set w .spy.watches.$watch_id
@@ -188,11 +188,11 @@
     $w.reason configure -text $reason
 
     if { $spy_alerts($watch_id) && $type=="available" } {
-        alert_dialog $connid $watch_id $nick $jid
+        alert_dialog $xlib $watch_id $nick $jid
     }
 }
 
-proc spy::alert_dialog {connid watch_id nick jid} {
+proc spy::alert_dialog {xlib watch_id nick jid} {
     set w .spy_alert_${watch_id}
 
     if {[winfo exists $w]} {
@@ -206,20 +206,20 @@
     message $frame.msg -text $message -width 70c
     pack $frame.msg -side left -fill x
 
-    $w add -text [::msgcat::mc "Open chat"] -command [list [namespace current]::open_chat $w $connid $jid ]
+    $w add -text [::msgcat::mc "Open chat"] -command [list [namespace current]::open_chat $w $xlib $jid ]
     $w add -text [::msgcat::mc "Cancel"] -command [list destroy $w]
 
     $w draw
 }
 
-proc spy::open_chat {w connid jid} {
+proc spy::open_chat {w xlib jid} {
     destroy $w
 
-    chat::open_to_user $connid $jid
+    chat::open_to_user $xlib $jid
 }
 
 
-proc spy::display {connid jid nick type reason} {
+proc spy::display {xlib jid nick type reason} {
     variable options
     variable watches
     set w .spy
@@ -259,16 +259,16 @@
         set watch_id [lindex $watch 0]
         set watch_regex [lindex $watch 1]
         if {[regexp "$watch_regex" $nick temp] || [regexp "$watch_regex" $jid temp]} {
-            update_watch $connid $watch_id $nick $jid $type $reason
+            update_watch $xlib $watch_id $nick $jid $type $reason
         }
     }
 }
 
-proc spy::client_presence_handler {connid from type x args} {
+proc spy::client_presence_handler {xlib from type x args} {
     variable options
     variable the_file
 
-    if {[catch { chat::get_nick $connid $from chat } nick]} {
+    if {[catch { chat::get_nick $xlib $from chat } nick]} {
 	if {[catch { chat::get_nick $from chat } nick]} {
 	    set nick $from
 	}
@@ -290,7 +290,7 @@
     if { "$type"=="" } { set type "available" }
     if { "$show"!="" } { set type "$type/$show" }
 
-    display "$connid" "$from" "$nick" "$type" "$reason"
+    display "$xlib" "$from" "$nick" "$type" "$reason"
 
     if {$options(log_file) != "" && $the_file == ""} {
 	init_spy



More information about the Tkabber-dev mailing list