mc list up up up up
This commit is contained in:
parent
d906ebacff
commit
3445caae9b
1 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ class Ans(StdAns):
|
||||||
AllowCmd = ['list']
|
AllowCmd = ['list']
|
||||||
if cmd in AllowCmd:
|
if cmd in AllowCmd:
|
||||||
if cmd == 'list':
|
if cmd == 'list':
|
||||||
output = getoutput('spigot status')
|
output = getoutput('spigot command list')
|
||||||
p = re.compile(r'There are (.*?)[ of a max]', re.S)
|
p = re.compile(r'There are (.*?)[ of a max]', re.S)
|
||||||
online = int(re.findall(p,output)[0])
|
online = int(re.findall(p,output)[0])
|
||||||
if online == 0:
|
if online == 0:
|
||||||
|
@ -21,6 +21,6 @@ class Ans(StdAns):
|
||||||
players = re.findall(p,output)[0].split(', ')
|
players = re.findall(p,output)[0].split(', ')
|
||||||
for player in players:
|
for player in players:
|
||||||
msg = msg + '\n' + player
|
msg = msg + '\n' + player
|
||||||
return msg
|
return msg
|
||||||
else:
|
else:
|
||||||
return self.parms[1] + ' 是暂时不被允许的命令!'
|
return self.parms[1] + ' 是暂时不被允许的命令!'
|
Loading…
Reference in a new issue