comparison src/plugins/plugin_misc_quiz.py @ 712:f610864eb7a5

plugins (MUC, tools, games): generalize the generation of a unique room name when joining a MUC and no room is specified: - method to get the MUC service moved to plugin_xep_0045 - joinMUC returns the muc name (given by user or generated) - getUniqueName can receive a specified service in argument
author souliane <souliane@mailoo.org>
date Sun, 17 Nov 2013 16:59:12 +0100
parents 75e4f5e2cc65
children 358018c5c398
comparison
equal deleted inserted replaced
711:c9792d0be499 712:f610864eb7a5
59 59
60 def __init__(self, host): 60 def __init__(self, host):
61 info(_("Plugin Quiz initialization")) 61 info(_("Plugin Quiz initialization"))
62 RoomGame.__init__(self, host, PLUGIN_INFO, (NS_QG, QG_TAG), player_init_data={'score': 0}, 62 RoomGame.__init__(self, host, PLUGIN_INFO, (NS_QG, QG_TAG), player_init_data={'score': 0},
63 options={'stage': None}) 63 options={'stage': None})
64 host.bridge.addMethod("quizGameLaunch", ".plugin", in_sign='ass', out_sign='', method=self.prepareRoom) # args: players, profile 64 host.bridge.addMethod("quizGameLaunch", ".plugin", in_sign='asss', out_sign='', method=self.prepareRoom) # args: players, room_jid, profile
65 host.bridge.addMethod("quizGameCreate", ".plugin", in_sign='sass', out_sign='', method=self.createGame) # args: room_jid, players, profile 65 host.bridge.addMethod("quizGameCreate", ".plugin", in_sign='sass', out_sign='', method=self.createGame) # args: room_jid, players, profile
66 host.bridge.addMethod("quizGameReady", ".plugin", in_sign='sss', out_sign='', method=self.playerReady) # args: player, referee, profile 66 host.bridge.addMethod("quizGameReady", ".plugin", in_sign='sss', out_sign='', method=self.playerReady) # args: player, referee, profile
67 host.bridge.addMethod("quizGameAnswer", ".plugin", in_sign='ssss', out_sign='', method=self.playerAnswer) 67 host.bridge.addMethod("quizGameAnswer", ".plugin", in_sign='ssss', out_sign='', method=self.playerAnswer)
68 host.bridge.addSignal("quizGameStarted", ".plugin", signature='ssass') # args: room_jid, referee, players, profile 68 host.bridge.addSignal("quizGameStarted", ".plugin", signature='ssass') # args: room_jid, referee, players, profile
69 host.bridge.addSignal("quizGameNew", ".plugin", 69 host.bridge.addSignal("quizGameNew", ".plugin",