Commit 42b0ce51 authored by Kirk Bater's avatar Kirk Bater Committed by Sijis Aviles

Added optional room arg to inroom

parent 27564bdc
......@@ -383,7 +383,7 @@ class TextBackend(ErrBot):
raise ValueError('A Room name must start by #.')
text_room = TextRoom(room[1:], self)
if text_room not in self._rooms:
self._rooms.insert(0, text_room)
return text_room
from errbot import BotPlugin, botcmd
from errbot import BotPlugin, botcmd, arg_botcmd
INROOM, USER, MULTILINE = 'inroom', 'user', 'multiline'
......@@ -43,12 +43,17 @@ class TextModeCmds(BotPlugin):
def inroom(self, msg, _):
def inroom(self, msg, args):
This puts you in a room with the bot.
self._bot._inroom = True
return f'Joined Room {self._bot._rooms[0]}.'
if args:
room = args
if not room:
room = '#testroom'
return f'Joined Room {room}.'
def inperson(self, msg, _):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment