Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

Commit

Permalink
Some style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunedan committed Aug 27, 2017
1 parent c858636 commit f85e37d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion EcheLOn.py
Expand Up @@ -402,7 +402,7 @@ class PlayerXmppPlugin(ElementBase):

name = 'query'
namespace = 'jabber:iq:player'
interfaces = set(('game', 'online'))
interfaces = {'game', 'online'}
sub_interfaces = interfaces
plugin_attrib = 'player'

Expand Down
13 changes: 6 additions & 7 deletions XpartaMuPP.py
Expand Up @@ -31,7 +31,7 @@
ProfileXmppPlugin)


class GameList():
class GameList(object):
"""Class to tracks all games in the lobby."""

def __init__(self):
Expand Down Expand Up @@ -75,7 +75,7 @@ class PlayerXmppPlugin(ElementBase):

name = 'query'
namespace = 'jabber:iq:player'
interfaces = set(('online'))
interfaces = {'online'}
sub_interfaces = interfaces
plugin_attrib = 'player'

Expand Down Expand Up @@ -180,13 +180,12 @@ def iqhandler(self, iq):
"""
if iq['type'] == 'error':
logging.error('iqhandler error' + iq['error']['condition'])
#self.disconnect()
# self.disconnect()
elif iq['type'] == 'get':
# Request lists.
# Send lists/register on leaderboard; depreciated once muc_online
# can send lists/register automatically on joining the room.
if 'boardlist' in iq.plugins:
command = iq['boardlist']['command']
try:
self.relay_board_list_request(iq['from'])
except:
Expand Down Expand Up @@ -389,9 +388,9 @@ def relay_board_list(self, board_list, to=None):
clients.
"""
iq = self.make_iq_result(ito=to)
#for i in board:
# stanza.addItem(board[i]['name'], board[i]['rating'])
#stanza.addCommand('boardlist')
# for i in board:
# stanza.addItem(board[i]['name'], board[i]['rating'])
# stanza.addCommand('boardlist')
iq.set_payload(board_list)

if not to:
Expand Down
8 changes: 4 additions & 4 deletions stanzas.py
Expand Up @@ -6,7 +6,7 @@ class BoardListXmppPlugin(ElementBase):

name = 'query'
namespace = 'jabber:iq:boardlist'
interfaces = set(('board', 'command', 'recipient'))
interfaces = {'board', 'command', 'recipient'}
sub_interfaces = interfaces
plugin_attrib = 'boardlist'

Expand All @@ -25,7 +25,7 @@ class GameListXmppPlugin(ElementBase):

name = 'query'
namespace = 'jabber:iq:gamelist'
interfaces = set(('game', 'command'))
interfaces = {'game', 'command'}
sub_interfaces = interfaces
plugin_attrib = 'gamelist'

Expand Down Expand Up @@ -70,7 +70,7 @@ class ProfileXmppPlugin(ElementBase):

name = 'query'
namespace = 'jabber:iq:profile'
interfaces = set(('profile', 'command', 'recipient'))
interfaces = {'profile', 'command', 'recipient'}
sub_interfaces = interfaces
plugin_attrib = 'profile'

Expand All @@ -86,4 +86,4 @@ def add_item(self, player, rating, highest_rating="0", rank="0", total_games_pla
"highestRating": highest_rating, "rank": rank,
"totalGamesPlayed": total_games_played, "wins": wins,
"losses": losses})
self.xml.append(item_xml)
self.xml.append(item_xml)

0 comments on commit f85e37d

Please sign in to comment.