[Tkabber-dev] r1553 - in trunk/tkabber-plugins: . checkers mute renju reversi

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Oct 18 17:11:55 MSD 2008


Author: sergei
Date: 2008-10-18 17:11:54 +0400 (Sat, 18 Oct 2008)
New Revision: 1553

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/checkers/checkers.tcl
   trunk/tkabber-plugins/mute/mute.tcl
   trunk/tkabber-plugins/renju/renju.tcl
   trunk/tkabber-plugins/reversi/reversi.tcl
Log:
	* checkers/checkers.tcl, mute/mute.tcl, renju/renju.tcl,
	  reversi/reversi.tcl: Fixed XML elements creation and IQ query.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-10-18 12:32:52 UTC (rev 1552)
+++ trunk/tkabber-plugins/ChangeLog	2008-10-18 13:11:54 UTC (rev 1553)
@@ -12,6 +12,9 @@
 
 	* georoster/georoster.tcl: Fixed typo.
 
+	* checkers/checkers.tcl, mute/mute.tcl, renju/renju.tcl,
+	  reversi/reversi.tcl: Fixed XML elements creation and IQ query.
+
 2008-10-17  Sergei Golovan <sgolovan at nes.ru>
 
 	* *: 0.11.1 is released.

Modified: trunk/tkabber-plugins/checkers/checkers.tcl
===================================================================
--- trunk/tkabber-plugins/checkers/checkers.tcl	2008-10-18 12:32:52 UTC (rev 1552)
+++ trunk/tkabber-plugins/checkers/checkers.tcl	2008-10-18 13:11:54 UTC (rev 1553)
@@ -143,7 +143,7 @@
     #set rjid [get_jid_of_user $jid]
 
     ::xmpp::sendIQ $xlib set \
-	query [::xmpp::xml::create create \
+	-query [::xmpp::xml::create create \
 			-xmlns games:board \
 			-attrs [list type checkers:$game \
 				     id $id \
@@ -1721,9 +1721,9 @@
 
     ::xmpp::xml::split $xml tag xmlns attrs cdata subels
 
-    lassign [split [::xmpp::xml::getAttr $attrs type] ":"] cathegory game
+    lassign [split [::xmpp::xml::getAttr $attrs type] ":"] category game
 
-    if {$cathegory != "checkers"} {
+    if {$category != "checkers"} {
 	return
     }
 
@@ -1762,9 +1762,9 @@
 
     ::xmpp::xml::split $xml tag xmlns attrs cdata subels
 
-    lassign [split [::xmpp::xml::getAttr $attrs type] ":"] cathegory game
+    lassign [split [::xmpp::xml::getAttr $attrs type] ":"] category game
 
-    if {$cathegory != "checkers"} {
+    if {$category != "checkers"} {
 	return
     }
 

Modified: trunk/tkabber-plugins/mute/mute.tcl
===================================================================
--- trunk/tkabber-plugins/mute/mute.tcl	2008-10-18 12:32:52 UTC (rev 1552)
+++ trunk/tkabber-plugins/mute/mute.tcl	2008-10-18 13:11:54 UTC (rev 1553)
@@ -30,7 +30,7 @@
 
 proc mute::editor::list_request {xlib jid} {
     ::xmpp::sendIQ $xlib get \
-	query [::xmpp::xml::create list \
+	-query [::xmpp::xml::create list \
 			-xmlns $::NS(mute_ancestor)] \
 	-to $jid \
 	-command [list [namespace current]::list_recv $xlib $jid]

Modified: trunk/tkabber-plugins/renju/renju.tcl
===================================================================
--- trunk/tkabber-plugins/renju/renju.tcl	2008-10-18 12:32:52 UTC (rev 1552)
+++ trunk/tkabber-plugins/renju/renju.tcl	2008-10-18 13:11:54 UTC (rev 1553)
@@ -131,7 +131,7 @@
     #set rjid [get_jid_of_user $jid]
 
     ::xmpp::sendIQ $xlib set \
-	-query [::xmpp::xml::createtag create \
+	-query [::xmpp::xml::create create \
 			-xmlns games:board \
 			-attrs [list type $game \
 				     id $id \
@@ -219,7 +219,7 @@
 	}
 
 	return [list result\
-		     [::xmpp::xml::createtag create \
+		     [::xmpp::xml::create create \
 				-xmlns games:board \
 				-attrs [list type $game \
 					     id $id]]]
@@ -356,7 +356,7 @@
 		update_controls $gid
 		draw_position $gid
 		highlight_last_move $gid
-		return [list result [::xmpp::xml::createtag turn \
+		return [list result [::xmpp::xml::create turn \
 					    -xmlns games:board \
 					    -attrs [list type $flags(game) \
 							 id $flags(id)]]]
@@ -367,7 +367,7 @@
 		    update_controls $gid
 		    draw_position $gid
 		    highlight_last_move $gid
-		    return [list result [::xmpp::xml::createtag turn \
+		    return [list result [::xmpp::xml::create turn \
 					    -xmlns games:board \
 					    -attrs [list type $flags(game) \
 							 id $flags(id)]]]
@@ -390,7 +390,7 @@
 	draw_position $gid
 	highlight_last_move $gid
 
-	return [list result [::xmpp::xml::createtag turn \
+	return [list result [::xmpp::xml::create turn \
 				    -xmlns games:board \
 				    -attrs [list type $flags(game) \
 						 id $flags(id)]]]
@@ -907,11 +907,11 @@
     upvar 0 $gid flags
 
     ::xmpp::sendIQ $flags(xlib) set \
-	-query [::xmpp::xml::createtag turn \
+	-query [::xmpp::xml::create turn \
 			-xmlns games:board \
 			-attrs [list type $flags(game) \
 				     id $flags(id)] \
-			-subelement [::xmpp::xml::createtag accept]] \
+			-subelement [::xmpp::xml::create accept]] \
 	-to $flags(opponent)
 
 	end_game $gid 0.5 [::msgcat::mc "Draw (You accepted)"]
@@ -933,11 +933,11 @@
     find_legal_moves $gid $flags(position,turn)
 
     ::xmpp::sendIQ $flags(xlib) set \
-	-query [::xmpp::xml::createtag turn \
+	-query [::xmpp::xml::create turn \
 			-xmlns games:board \
 			-attrs [list type $flags(game) \
 				     id $flags(id)] \
-			-subelement [::xmpp::xml::createtag skip]] \
+			-subelement [::xmpp::xml::create skip]] \
 	-to $flags(opponent) \
 	-command [list [namespace current]::send_result $gid]
 
@@ -955,11 +955,11 @@
     upvar 0 $gid flags
 
     ::xmpp::sendIQ $flags(xlib) set \
-	-query [::xmpp::xml::createtag turn \
+	-query [::xmpp::xml::create turn \
 			-xmlns games:board \
 			-attrs [list type $flags(game) \
 				     id $flags(id)] \
-			-subelement [::xmpp::xml::createtag resign]] \
+			-subelement [::xmpp::xml::create resign]] \
 	-to $flags(opponent)
 
     end_game $gid 0 [::msgcat::mc "Opponent wins (You resigned)"]
@@ -972,14 +972,14 @@
     variable $gid
     upvar 0 $gid flags
 
-    set put_tags [list [::xmpp::xml::createtag put \
+    set put_tags [list [::xmpp::xml::create put \
 				-attrs [list pos "$ct,$rt"]]]
     if {$flags(position,draw)} {
-	lappend put_tags [::xmpp::xml::createtag draw]
+	lappend put_tags [::xmpp::xml::create draw]
     }
 
     ::xmpp::sendIQ $flags(xlib) set \
-	-query [::xmpp::xml::createtag turn \
+	-query [::xmpp::xml::create turn \
 			-xmlns games:board \
 			-attrs [list type $flags(game) \
 				     id $flags(id)] \
@@ -1476,7 +1476,7 @@
 	}
     }
 
-    if {[::xmpp::xml::isattr $attrs color]} {
+    if {[::xmpp::xml::isAttr $attrs color]} {
 	set color [::xmpp::xml::getAttr $attrs color]
 	switch -- $color {
 	    white -

Modified: trunk/tkabber-plugins/reversi/reversi.tcl
===================================================================
--- trunk/tkabber-plugins/reversi/reversi.tcl	2008-10-18 12:32:52 UTC (rev 1552)
+++ trunk/tkabber-plugins/reversi/reversi.tcl	2008-10-18 13:11:54 UTC (rev 1553)
@@ -102,7 +102,7 @@
     #set rjid [get_jid_of_user $jid]
 
     ::xmpp::sendIQ $xlib set \
-	query [::xmpp::xml::create create \
+	-query [::xmpp::xml::create create \
 			-xmlns games:board \
 			-attrs [list type reversi \
 				     id $id \



More information about the Tkabber-dev mailing list