plugin misc_room_game, radiocol, tarot: fixes bridge method "prepareRoom" declaration (add "async=True")
This commit is contained in:
parent
a43608b966
commit
ba2cf4d448
3 changed files with 5 additions and 5 deletions
|
|
@ -69,7 +69,7 @@ class Radiocol(object):
|
|||
RoomGame._init_(self, host, PLUGIN_INFO, (NC_RADIOCOL, RADIOC_TAG),
|
||||
game_init={'queue': [], 'upload': True, 'playing': None, 'playing_time': 0, 'to_delete': {}})
|
||||
self.host = host
|
||||
host.bridge.addMethod("radiocolLaunch", ".plugin", in_sign='asss', out_sign='', method=self.prepareRoom)
|
||||
host.bridge.addMethod("radiocolLaunch", ".plugin", in_sign='asss', out_sign='', method=self.prepareRoom, async=True)
|
||||
host.bridge.addMethod("radiocolCreate", ".plugin", in_sign='sass', out_sign='', method=self.createGame)
|
||||
host.bridge.addMethod("radiocolSongAdded", ".plugin", in_sign='sss', out_sign='', method=self.radiocolSongAdded, async=True)
|
||||
host.bridge.addSignal("radiocolPlayers", ".plugin", signature='ssass') # room_jid, referee, players, profile
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ class RoomGame(object):
|
|||
profile = self.host.memory.getProfileName(profile_key)
|
||||
if not profile:
|
||||
log.error(_("Unknown profile"))
|
||||
return
|
||||
return defer.succeed(None)
|
||||
if other_players is None:
|
||||
other_players = []
|
||||
|
||||
|
|
@ -419,11 +419,11 @@ class RoomGame(object):
|
|||
if room_jid_s is not None and room_jid_s != "": # a room name has been specified
|
||||
if room_jid_s in self.host.plugins["XEP-0045"].clients[profile].joined_rooms:
|
||||
roomJoined(self.host.plugins["XEP-0045"].clients[profile].joined_rooms[room_jid_s])
|
||||
return
|
||||
return defer.succeed(None)
|
||||
else:
|
||||
room_jid_s = self.getUniqueName(profile_key=profile_key)
|
||||
if room_jid_s == "":
|
||||
return
|
||||
return defer.succeed(None)
|
||||
user_jid = self.host.getJidNStream(profile)[0]
|
||||
d = self.host.plugins["XEP-0045"].join(JID(room_jid_s), user_jid.user, {}, profile)
|
||||
return d.addCallback(roomJoined)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class Tarot(object):
|
|||
game_init={'hand_size': 18, 'init_player': 0, 'current_player': None, 'contrat': None, 'stage': None},
|
||||
player_init={'score': 0})
|
||||
self.contrats = [_('Passe'), _('Petite'), _('Garde'), _('Garde Sans'), _('Garde Contre')]
|
||||
host.bridge.addMethod("tarotGameLaunch", ".plugin", in_sign='asss', out_sign='', method=self.prepareRoom) # args: players, room_jid, profile
|
||||
host.bridge.addMethod("tarotGameLaunch", ".plugin", in_sign='asss', out_sign='', method=self.prepareRoom, async=True) # args: players, room_jid, profile
|
||||
host.bridge.addMethod("tarotGameCreate", ".plugin", in_sign='sass', out_sign='', method=self.createGame) # args: room_jid, players, profile
|
||||
host.bridge.addMethod("tarotGameReady", ".plugin", in_sign='sss', out_sign='', method=self.playerReady) # args: player, referee, profile
|
||||
host.bridge.addMethod("tarotGamePlayCards", ".plugin", in_sign='ssa(ss)s', out_sign='', method=self.play_cards) # args: player, referee, cards, profile
|
||||
|
|
|
|||
Loading…
Reference in a new issue