def listen(room):
def onmessage(m):<EOL><INDENT>"""<STR_LIT>"""<EOL>print(m)<EOL>if m.admin or m.nick == r.user.name:<EOL><INDENT>return<EOL><DEDENT>if "<STR_LIT>" in m.msg.lower():<EOL><INDENT>r.post_chat("<STR_LIT>")<EOL><DEDENT>elif m.msg.lower() in ("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>r.post_chat("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>r.post_chat(re.sub(r"<STR_LIT>", "<STR_LIT>", m.msg, re.I))<EOL><DEDENT><DEDENT>with Room(room) as r:<EOL><INDENT>r.user.change_nick("<STR_LIT>")<EOL>r.add_listener("<STR_LIT>", onmessage)<EOL>r.listen()<EOL><DEDENT>
Open a volafile room and start listening to it