Added Gigef to Bridge player map and fixed output format in Bridge and Control
This commit is contained in:
parent
28a2f01c0f
commit
56165e96e5
2 changed files with 12 additions and 11 deletions
|
|
@ -14,34 +14,34 @@ def signalControl(usr: str, msg: str):
|
|||
available_modules, loaded_modules, unloaded_modules = libcommon.listModules()
|
||||
libsignal.sendMessage(
|
||||
f"""Available modules: {" ".join(available_modules)}
|
||||
Loaded modules: {" ".join(loaded_modules)}
|
||||
Unloaded modules: {" ".join(unloaded_modules)}""", RetardsServer
|
||||
Loaded modules: {" ".join(loaded_modules)}
|
||||
Unloaded modules: {" ".join(unloaded_modules)}""", RetardsServer
|
||||
)
|
||||
case ["!modules", "load", *modules]:
|
||||
for module in modules:
|
||||
try:
|
||||
libcommon.loadModule(module)
|
||||
libsignal.sendMessage(
|
||||
f"[Serve] '{module}' successfully loaded.", RetardsServer)
|
||||
f"'{module}' successfully loaded.", RetardsServer)
|
||||
except Exception as e:
|
||||
libsignal.sendMessage(
|
||||
f"[Serve] Error loading '{module}': {e}", RetardsServer)
|
||||
f"Error loading '{module}': {e}", RetardsServer)
|
||||
case ["!modules", "unload", *modules]:
|
||||
for module in modules:
|
||||
try:
|
||||
libcommon.unloadModule(module)
|
||||
libsignal.sendMessage(
|
||||
f"[Serve] '{module}' successfully unloaded.", RetardsServer)
|
||||
f"'{module}' successfully unloaded.", RetardsServer)
|
||||
except Exception as e:
|
||||
libsignal.sendMessage(
|
||||
f"[Serve] Error unloading '{module}': {e}", RetardsServer)
|
||||
f"Error unloading '{module}': {e}", RetardsServer)
|
||||
case ["!modules", "reload", *modules]:
|
||||
for module in modules:
|
||||
try:
|
||||
libcommon.unloadModule(module)
|
||||
libcommon.loadModule(module)
|
||||
libsignal.sendMessage(
|
||||
f"[Serve] '{module}' successfully reloaded.", RetardsServer)
|
||||
f"'{module}' successfully reloaded.", RetardsServer)
|
||||
except Exception as e:
|
||||
libsignal.sendMessage(
|
||||
f"[Serve] Error reloading '{module}': {e}", RetardsServer)
|
||||
f"Error reloading '{module}': {e}", RetardsServer)
|
||||
|
|
|
|||
|
|
@ -12,16 +12,17 @@ players = {
|
|||
"Filippo": "BrixsBang",
|
||||
"Mr Beast": "firr",
|
||||
"Nick": "NPZ",
|
||||
"Osvaldo": "Cheruz"
|
||||
"Osvaldo": "Cheruz",
|
||||
"Black Gigef": "Gigef",
|
||||
}
|
||||
|
||||
|
||||
@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: <(.*)> (.*)")
|
||||
def minecraftToSignal(usr: str, msg: str):
|
||||
libsignal.sendMessage(f"[{usr}] {msg}", RetardsServer)
|
||||
libsignal.sendMessage(f"<{usr}> {msg}", RetardsServer)
|
||||
|
||||
|
||||
@libsignal.onMessage(RetardsServer)
|
||||
def signalToMinecraft(usr: str, msg: str):
|
||||
usr = players.get(usr, usr)
|
||||
libminecraft.sendCommand(f'tellraw @a "[{usr}] {msg}"')
|
||||
libminecraft.sendCommand(f'tellraw @a "<{usr}> {msg}"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue