comparison sat/plugins/plugin_misc_room_game.py @ 2765:378188abe941

misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)
author Goffi <goffi@goffi.org>
date Fri, 11 Jan 2019 11:13:15 +0100
parents 56f94936df1e
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2764:92af49cde255 2765:378188abe941
486 return defer.succeed(None) 486 return defer.succeed(None)
487 487
488 user_jid = self.host.getJidNStream(profile)[0] 488 user_jid = self.host.getJidNStream(profile)[0]
489 d = self.host.plugins["XEP-0045"].join(room_jid, user_jid.user, {}, profile) 489 d = self.host.plugins["XEP-0045"].join(room_jid, user_jid.user, {}, profile)
490 return d.addCallback( 490 return d.addCallback(
491 lambda dummy: self._createOrInvite(client, room_jid, other_players) 491 lambda __: self._createOrInvite(client, room_jid, other_players)
492 ) 492 )
493 493
494 def userJoinedTrigger(self, room, user, profile): 494 def userJoinedTrigger(self, room, user, profile):
495 """This trigger is used to check if the new user can take part of a game, create the game if we were waiting for him or just update the players list. 495 """This trigger is used to check if the new user can take part of a game, create the game if we were waiting for him or just update the players list.
496 496
518 u"Invitations from %s to play %s in %s have been lost!" 518 u"Invitations from %s to play %s in %s have been lost!"
519 % (profile_nick, self.name, room_jid.userhost()) 519 % (profile_nick, self.name, room_jid.userhost())
520 ) 520 )
521 return True 521 return True
522 other_players = self.invitations[room_jid][batch][1] 522 other_players = self.invitations[room_jid][batch][1]
523 (auth, nicks, dummy) = self._checkWaitAuth(room, other_players) 523 (auth, nicks, __) = self._checkWaitAuth(room, other_players)
524 if auth: 524 if auth:
525 del self.invitations[room_jid][batch] 525 del self.invitations[room_jid][batch]
526 nicks.insert(0, profile_nick) # add the referee 526 nicks.insert(0, profile_nick) # add the referee
527 self.createGame(room_jid, nicks, profile_key=profile) 527 self.createGame(room_jid, nicks, profile_key=profile)
528 return True 528 return True