[Tkabber-dev] r1755 - in trunk/tkabber: . plugins/si

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Mar 28 09:49:28 MSK 2009


Author: sergei
Date: 2009-03-28 09:49:27 +0300 (Sat, 28 Mar 2009)
New Revision: 1755

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/si/ibb.tcl
   trunk/tkabber/plugins/si/iqibb.tcl
   trunk/tkabber/plugins/si/socks5.tcl
   trunk/tkabber/si.tcl
Log:
	* si.tcl, plugins/si/ibb.tcl, plugins/si/iqibb.tcl,
	  plugins/si/socks5.tcl: Added enabling/disabling transports by default
	  when registering them. Disable bytestream transport by default, as it
	  not always works, so it should be switched on only if user knows how
	  to work with it.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-03-27 19:39:58 UTC (rev 1754)
+++ trunk/tkabber/ChangeLog	2009-03-28 06:49:27 UTC (rev 1755)
@@ -1,3 +1,11 @@
+2009-03-28  Sergei Golovan  <sgolovan at nes.ru>
+
+	* si.tcl, plugins/si/ibb.tcl, plugins/si/iqibb.tcl,
+	  plugins/si/socks5.tcl: Added enabling/disabling transports by default
+	  when registering them. Disable bytestream transport by default, as it
+	  not always works, so it should be switched on only if user knows how
+	  to work with it.
+
 2009-03-27  Sergei Golovan  <sgolovan at nes.ru>
 
 	* custom.tcl: Run commands associated with customizable variables on

Modified: trunk/tkabber/plugins/si/ibb.tcl
===================================================================
--- trunk/tkabber/plugins/si/ibb.tcl	2009-03-27 19:39:58 UTC (rev 1754)
+++ trunk/tkabber/plugins/si/ibb.tcl	2009-03-28 06:49:27 UTC (rev 1755)
@@ -203,7 +203,7 @@
 
 ###############################################################################
 
-si::register_transport $::NS(ibb) $::NS(ibb) 75 \
+si::register_transport $::NS(ibb) $::NS(ibb) 75 enabled \
     [namespace current]::ibb::connect \
     [namespace current]::ibb::send_data \
     [namespace current]::ibb::close

Modified: trunk/tkabber/plugins/si/iqibb.tcl
===================================================================
--- trunk/tkabber/plugins/si/iqibb.tcl	2009-03-27 19:39:58 UTC (rev 1754)
+++ trunk/tkabber/plugins/si/iqibb.tcl	2009-03-28 06:49:27 UTC (rev 1755)
@@ -138,7 +138,7 @@
 
 ###############################################################################
 
-si::register_transport $::NS(iqibb) $::NS(iqibb) 70 \
+si::register_transport $::NS(iqibb) $::NS(iqibb) 70 enabled \
 		       [namespace current]::iqibb::connect \
 		       [namespace current]::iqibb::send_data \
 		       [namespace current]::iqibb::close

Modified: trunk/tkabber/plugins/si/socks5.tcl
===================================================================
--- trunk/tkabber/plugins/si/socks5.tcl	2009-03-27 19:39:58 UTC (rev 1754)
+++ trunk/tkabber/plugins/si/socks5.tcl	2009-03-28 06:49:27 UTC (rev 1755)
@@ -658,7 +658,7 @@
 
 ###############################################################################
 
-si::register_transport $::NS(bytestreams) $::NS(bytestreams) 50 \
+si::register_transport $::NS(bytestreams) $::NS(bytestreams) 50 disabled \
 		       [namespace current]::socks5::initiator::connect \
 		       [namespace current]::socks5::initiator::send_data \
 		       [namespace current]::socks5::initiator::close

Modified: trunk/tkabber/si.tcl
===================================================================
--- trunk/tkabber/si.tcl	2009-03-27 19:39:58 UTC (rev 1754)
+++ trunk/tkabber/si.tcl	2009-03-28 06:49:27 UTC (rev 1755)
@@ -400,7 +400,7 @@
 ###############################################################################
 ###############################################################################
 
-proc si::register_transport {name oppos prio connect send close} {
+proc si::register_transport {name oppos prio default connect send close} {
     variable transport
 
     lappend transport(list) [list $name $prio]
@@ -408,6 +408,11 @@
     set transport(connect,$name) $connect
     set transport(send,$name) $send
     set transport(close,$name) $close
+    if {$default == "enabled"} {
+	set transport(default,$name) 1
+    } else {
+	set transport(default,$name) 0
+    }
 }
 
 ###############################################################################
@@ -427,7 +432,7 @@
     foreach t $trans {
 	lassign $t name prio
 
-	custom::defvar transport(allowed,$name) 1 \
+	custom::defvar transport(allowed,$name) $transport(default,$name) \
 	[::msgcat::mc "Enable SI transport %s." $name] \
 	-type boolean -group {Stream Initiation}
     }



More information about the Tkabber-dev mailing list