mirror of
https://git.dodsorf.as/Dandellion/dotfiles.git
synced 2024-12-22 07:17:28 +01:00
Fix Minecraft servere status
This commit is contained in:
parent
313cd57bf3
commit
c909f3c008
@ -188,6 +188,10 @@ in
|
||||
|
||||
try:
|
||||
pvv_status = pvv.status()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
dods_status = dods.status()
|
||||
except:
|
||||
pass
|
||||
@ -196,10 +200,15 @@ in
|
||||
try:
|
||||
if pvv_status.players.online > 0:
|
||||
result += ("P" + str(pvv_status.players.online))
|
||||
if dods_status > 0:
|
||||
result += ("D" + str(pvv_status.players.online))
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
if dods_status.players.online > 0:
|
||||
result += ("D" + str(dods_status.players.online))
|
||||
except:
|
||||
pass
|
||||
|
||||
print(result)
|
||||
'';
|
||||
click-left = "" + pkgs.writers.writePython3 "minecraft_status" { libraries = with pkgs.python3.pkgs; [ mcstatus notify2 ]; flakeIgnore = [ "E722" ]; } ''
|
||||
@ -214,6 +223,10 @@ in
|
||||
|
||||
try:
|
||||
pvv_status = pvv.status()
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
dods_status = dods.status()
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user