Mapped Signal contact names to Minecraft usernames in Bridge
This commit is contained in:
parent
717369ffef
commit
28a2f01c0f
1 changed files with 11 additions and 0 deletions
|
|
@ -6,6 +6,16 @@ RetardsServer = libcommon.Group(
|
|||
"Retards Server", "5PlbXaPmWZQkhmuyyC/fkWTy8K+BqomjK7byVDyxmpo=")
|
||||
|
||||
|
||||
players = {
|
||||
"Malasaur": "Malasaur",
|
||||
"AlForno": "stef",
|
||||
"Filippo": "BrixsBang",
|
||||
"Mr Beast": "firr",
|
||||
"Nick": "NPZ",
|
||||
"Osvaldo": "Cheruz"
|
||||
}
|
||||
|
||||
|
||||
@libminecraft.onConsoleOutput(r"\[.*\] \[Server thread\/INFO\]: <(.*)> (.*)")
|
||||
def minecraftToSignal(usr: str, msg: str):
|
||||
libsignal.sendMessage(f"[{usr}] {msg}", RetardsServer)
|
||||
|
|
@ -13,4 +23,5 @@ def minecraftToSignal(usr: str, msg: str):
|
|||
|
||||
@libsignal.onMessage(RetardsServer)
|
||||
def signalToMinecraft(usr: str, msg: str):
|
||||
usr = players.get(usr, usr)
|
||||
libminecraft.sendCommand(f'tellraw @a "[{usr}] {msg}"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue