update some of the help strings and readme for encryption flag

This commit is contained in:
William Kray
2024-08-26 16:15:32 -07:00
parent cdc8bf9e56
commit b8a5253e4f
2 changed files with 8 additions and 2 deletions
+3
View File
@@ -63,6 +63,9 @@ returning their power to whatever the room default is (usually 0).
## room creation ## room creation
use the `createroom` subcommand to create a new room according to your preferences, and join it into the parent space. use the `createroom` subcommand to create a new room according to your preferences, and join it into the parent space.
include the `--encrypt` flag in your command to encrypt the room even if the default configuration is to create rooms
unencrypted.
will attempt to sanitize the room name and assign a room alias automatically. the bot user will be assigned very high will attempt to sanitize the room name and assign a room alias automatically. the bot user will be assigned very high
power level (1000) and set an admin power level (100) to plugin administrators, 50 to moderators. this ensures that the power level (1000) and set an admin power level (100) to plugin administrators, 50 to moderators. this ensures that the
bot is still able to manage room admins. the bot will also invite other users to these new rooms as configured. bot is still able to manage room admins. the bot will also invite other users to these new rooms as configured.
+5 -2
View File
@@ -413,11 +413,14 @@ class CommunityBot(Plugin):
await evt.reply("lol you don't have permission to do that") await evt.reply("lol you don't have permission to do that")
@community.subcommand("createroom", help="create a new room titled <roomname> and add it to the parent space") @community.subcommand("createroom", help="create a new room titled <roomname> and add it to the parent space. \
optionally include `--encrypt` to encrypt it regardless of the default settings.")
@command.argument("roomname", pass_raw=True, required=True) @command.argument("roomname", pass_raw=True, required=True)
async def create_that_room(self, evt: MessageEvent, roomname: str) -> None: async def create_that_room(self, evt: MessageEvent, roomname: str) -> None:
if (roomname == "help") or len(roomname) == 0: if (roomname == "help") or len(roomname) == 0:
await evt.reply('pass me a room name (like "cool topic") and i will create it and add it to the space') await evt.reply('pass me a room name (like "cool topic") and i will create it and add it to the space. \
use `--encrypt` to ensure it is encrypted at creation time even if that isnt my default \
setting.')
else: else:
if evt.sender in self.config["admins"] or evt.sender in self.config["mods"]: if evt.sender in self.config["admins"] or evt.sender in self.config["mods"]:
encrypted_flag_regex = re.compile(r'(\s+|^)-+encrypt(ed)?\s?') encrypted_flag_regex = re.compile(r'(\s+|^)-+encrypt(ed)?\s?')