diff plugins/plugin_misc_tarot.py @ 102:94011f553cd0

misc bugfixes - wix: added forgotten profile in gateways management - xml_tools: removed XMLClass to the 2 methods as a direct methods - plugin_xep_100 (gateways discovery): added error callback
author Goffi <goffi@goffi.org>
date Tue, 22 Jun 2010 13:58:53 +0800
parents 783e9d6980ec
children 7201851d9aed
line wrap: on
line diff
--- a/plugins/plugin_misc_tarot.py	Sat Jun 19 17:15:30 2010 +0800
+++ b/plugins/plugin_misc_tarot.py	Tue Jun 22 13:58:53 2010 +0800
@@ -32,7 +32,7 @@
 from zope.interface import implements
 
 from wokkel import disco, iwokkel, data_form
-from tools.xml_tools import XMLTools
+from tools.xml_tools import dataForm2xml
 
 try:
     from twisted.words.protocols.xmlstream import XMPPHandler
@@ -55,7 +55,7 @@
 "description": _("""Implementation of Tarot card game""")
 }
 
-suits_order = ['pique', 'coeur', 'trefle', 'carreau', 'atout'] #I have swith the usual order 'trefle' and 'carreau' because card are more easy to see if suit colour change (black, red, black, red)
+suits_order = ['pique', 'coeur', 'trefle', 'carreau', 'atout'] #I have switched the usual order 'trefle' and 'carreau' because card are more easy to see if suit colour change (black, red, black, red)
 values_order = map(str,range(1,11))+["valet","cavalier","dame","roi"]
 
 class Card():
@@ -591,7 +591,7 @@
 
             elif elt.name == 'contrat': #it's time to choose contrat
                 form = data_form.Form.fromElement(elt.firstChildElement())
-                xml_data = XMLTools.dataForm2xml(form)
+                xml_data = dataForm2xml(form)
                 self.host.bridge.tarotGameChooseContrat(room_jid.userhost(), xml_data, profile)
            
             elif elt.name == 'contrat_choosed':
@@ -733,7 +733,7 @@
                 for looser in elt.elements(name='looser', uri=''):
                     loosers.append(unicode(looser))
                 form = data_form.Form.fromElement(form_elt)
-                xml_data = XMLTools.dataForm2xml(form)
+                xml_data = dataForm2xml(form)
                 self.host.bridge.tarotGameScore(room_jid.userhost(), xml_data, winners, loosers, profile)
             elif elt.name == 'error':
                 if elt['type'] == 'invalid_cards':