Removed all references which were still left regarding Tyrbot.

This commit is contained in:
2021-09-06 20:39:09 +02:00
parent 10df6c3d26
commit ac5dc38147
53 changed files with 120 additions and 133 deletions
+14 -13
View File
@@ -47,31 +47,34 @@ class RelayController:
[self.MESSAGE_SOURCE])
self.setting_service.register(self.module_name, "websocket_relay_enabled", False, BooleanSettingType(),
"Enable the websocket relay")
"Enable the websocket relay")
self.setting_service.register(self.module_name, "websocket_relay_server_address",
"ws://localhost/subscribe/relay",
"ws://localhost/subscribe/relay",
TextSettingType(["ws://localhost/subscribe/relay"]),
"The address of the websocket relay server",
"All bots on the relay must connect to the same server and channel. "
"If using the public relay server, use a unique channel name.")
"The address of the websocket relay server",
"All bots on the relay must connect to the same server and channel. "
"If using the public relay server, use a unique channel name.")
self.setting_service.register(self.module_name, "websocket_relay_channel_color", "#FFFF00",
ColorSettingType(), "Color of the channel in websocket relay messages")
self.setting_service.register(self.module_name, "websocket_relay_message_color", "#FCA712",
ColorSettingType(),
"Color of the message content in websocket relay messages")
"Color of the message content in websocket relay messages")
self.setting_service.register(self.module_name, "websocket_relay_sender_color", "#00DE42",
ColorSettingType(), "Color of the sender in websocket relay messages")
self.setting_service.register(self.module_name, "websocket_encryption_key", "",
HiddenSettingType(allow_empty=True),
"An encryption key used to encrypt messages over a public websocket relay")
"An encryption key used to encrypt messages over a public websocket relay")
self.setting_service.register(self.module_name, "ws_relay_prefix", "", TextSettingType(allow_empty=True),
"Name of this relay (if you don't want to use org or bot name)")
"Name of this relay (if you don't want to use org or bot name)")
self.setting_service.register(self.module_name, "ws_msg_relay_prefix", "||",
TextSettingType(["!", "#", "*", "@", "$", "+", "-"]),
"Prefix for Messages which should get relayed")
"Prefix for Messages which should get relayed")
self.setting_service.register(self.module_name, "ws_relay_type", "with_symbol",
TextSettingType(["with_symbol", "unless_symbol", "always"]),
"Relay Messages", )
"Relay Messages", )
self.setting_service.register(self.module_name, "ws_relay_salt", "IGNCore",
TextSettingType(["IGNCore", "IgnCore"]),
"Relay Messages", )
self.initialize_encrypter(self.setting_service.get("websocket_encryption_key").get_value())
self.setting_service.register_change_listener("websocket_relay_enabled", self.websocket_relay_update)
@@ -84,9 +87,7 @@ class RelayController:
def initialize_encrypter(self, password):
if password:
# using hard-coded salt is less secure as it nullifies the
# function of the salt and allows for rainbow attacks
salt = b"tyrbot"
salt = self.setting_service.get("ws_relay_salt").get_value()
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
length=32,