Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit 2c8ae88

Browse files
committed
Release 1.2.3
1 parent c812622 commit 2c8ae88

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

packets/data_types.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,27 @@ def _encode(self, obj, context):
7070
def _decode(self, obj, context):
7171
return obj.string
7272

73+
7374
class Joiner(Adapter):
7475
def _encode(self, obj, context):
7576
return obj
77+
7678
def _decode(self, obj, context):
7779
return "".join(obj)
80+
81+
7882
star_string_struct = lambda name="star_string": Struct(name,
7983
VLQ("length"),
8084
String("string", lambda ctx: ctx.length)
8185
)
8286

87+
8388
class VariantVariant(Construct):
8489
def _parse(self, stream, context):
8590
l = VLQ("").parse_stream(stream)
8691
return [Variant("").parse_stream(stream) for _ in range(l)]
8792

93+
8894
class DictVariant(Construct):
8995
def _parse(self, stream, context):
9096
l = VLQ("").parse_stream(stream)
@@ -114,9 +120,11 @@ def _parse(self, stream, context):
114120
elif x == 7:
115121
return DictVariant("").parse_stream(stream)
116122

123+
117124
class StarByteArray(Construct):
118125
def _parse(self, stream, context):
119126
l = VLQ("").parse_stream(stream)
120127
return _read_stream(stream, l)
128+
121129
def _build(self, obj, stream, context):
122-
_write_stream(stream, len(obj), VLQ("").build(len(obj))+obj)
130+
_write_stream(stream, len(obj), VLQ("").build(len(obj)) + obj)

plugins/core/admin_commands_plugin/admin_command_plugin.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ def promote(self, data):
6262
self.logger.trace("Player object in promote command, found by name, is %s." % str(player))
6363
if player is not None:
6464
self.logger.trace("Player object was not None. Dump of player object follows.")
65-
for line in pprint.pformat(player):
66-
self.logger.trace("\t"+line)
65+
for line in pprint.pformat(player).split("\n"):
66+
self.logger.trace("\t" + line)
6767
old_rank = player.access_level
6868
if old_rank >= self.protocol.player.access_level:
69-
self.logger.trace("The old rank was greater or equal to the current rank. Sending a message and returning.")
69+
self.logger.trace(
70+
"The old rank was greater or equal to the current rank. Sending a message and returning.")
7071
self.protocol.send_chat_message(
7172
"You cannot change that user's access level as they are at least at an equal level as you.")
7273
return

plugins/core/player_manager/manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def colored_name(self, colors):
115115
logger.trace("Color is %s", color)
116116
name = self.name
117117
logger.trace("Name is %s", name)
118-
logger.trace("Returning the following data for colored name. %s:%s:%s", color, name, colors['default'])
118+
logger.trace("Returning the following data for colored name. %s:%s:%s", color, name,
119+
colors['default'])
119120
return color + name + colors["default"]
120121

121122
@property

plugins/core/player_manager/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ def format_player_response(self, players):
138138
"Results: %s" % "\n".join(["%s: %s" % (player.uuid, player.name) for player in players[:25]]))
139139
self.protocol.send_chat_message(
140140
"And %d more. Narrow it down with SQL like syntax. Feel free to use a *, it will be replaced appropriately." % (
141-
len(players) - 25))
141+
len(players) - 25))

plugins/core/starbound_config_manager/starbound_config_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ def activate(self):
2929
if self.config.upstream_port != starbound_config['gamePort']:
3030
raise FatalPluginError(
3131
"The starbound gamePort option (%d) does not match the config.json value (%d)." % (
32-
starbound_config['gamePort'], self.config.upstream_port))
32+
starbound_config['gamePort'], self.config.upstream_port))
3333
self._spawn = starbound_config['defaultWorldCoordinate'].split(":")
3434

3535
@permissions(UserLevels.GUEST)
3636
def spawn(self, data):
3737
"""Moves your ship to spawn. Syntax: /move_ship_to_spawn"""
38-
print self._spawn
3938
self.plugins['warpy_plugin'].move_player_ship(self.protocol, [x for x in self._spawn])
4039
self.protocol.send_chat_message("Moving your ship to spawn.")

0 commit comments

Comments
 (0)