Begin port to 26.3: movement
This commit is contained in:
+7
-2
@@ -39,7 +39,9 @@ class Commands:
|
||||
|
||||
text = text.replace('zzz', '!zzz')
|
||||
|
||||
match = re.match(r'(.*\W+)\s+(['+bot_num+'|!])(\w+) ?(.*)', text)
|
||||
match = re.match(
|
||||
r'(.*\W+)\s+([{}!])(\w+) ?(.*)'.format(re.escape(bot_num)),
|
||||
text)
|
||||
if match:
|
||||
meta, prefix, command, data = match.groups()
|
||||
else:
|
||||
@@ -155,7 +157,10 @@ class Commands:
|
||||
if command == 'loaded':
|
||||
l = self.g.chunks.get_loaded_area()
|
||||
reply = '{}, {}, {} to {}, {}, {}'.format(*l[0], *l[1])
|
||||
reply += ' - ' + str(len(self.g.chunks.chunks)//16) + ' chunks'
|
||||
chunk_count = getattr(
|
||||
self.g.chunks, 'loaded_chunk_count',
|
||||
len(self.g.chunks.chunks) // 16)
|
||||
reply += ' - ' + str(chunk_count) + ' chunks'
|
||||
|
||||
## !players - prints the current players
|
||||
## !players clear - clears the current player list
|
||||
|
||||
Reference in New Issue
Block a user