Initialize room
This commit is contained in:
parent
a0bd6b71bf
commit
4314fa60f3
3 changed files with 35 additions and 5 deletions
|
|
@ -1,9 +1,37 @@
|
|||
import connection
|
||||
from . import connection
|
||||
from . import messages
|
||||
from . import sessions
|
||||
|
||||
class Room():
|
||||
"""
|
||||
TODO
|
||||
Connects to and provides more abstract access to a room on euphoria.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.messages = []
|
||||
def __init__(self, room, nick=None, password=None, account_email=None, account_password=None):
|
||||
"""
|
||||
room - name of the room to connect to
|
||||
nick - nick to assume, None -> no nick
|
||||
password - room password (in case the room is private)
|
||||
account_email - email of your account
|
||||
account_password - password of your account
|
||||
"""
|
||||
|
||||
self.room = room
|
||||
self.nick = nick
|
||||
self.password = password
|
||||
self.account_email = account_email
|
||||
self.account_password = account_password
|
||||
|
||||
self.messages = messages.Messages()
|
||||
self.sessions = sessions.Sessions()
|
||||
|
||||
self.con = connection.Connection(self.room)
|
||||
|
||||
def launch(self):
|
||||
"""
|
||||
launch() -> Thread
|
||||
|
||||
Open connection in a new thread (see connection.Connection.launch).
|
||||
"""
|
||||
|
||||
return self.con.launch()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue