Mercurial > xib
diff start_bots_from_xml_config.py @ 21:801160b4136f
Introduced a bridge's "say" attribute to offer more flexibility in what the bot says.
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Thu, 20 Aug 2009 15:17:20 +0200 |
parents | c1b84196c100 |
children | bfa32b017fc9 |
line wrap: on
line diff
--- a/start_bots_from_xml_config.py +++ b/start_bots_from_xml_config.py @@ -54,15 +54,14 @@ try: for bridge_el in bot_el.getElementsByTagName('bridge'): xmpp_room = bridge_el.getElementsByTagName('xmpp-room')[0] irc = bridge_el.getElementsByTagName('irc')[0] - say_participants_list = True - if bridge_el.hasAttribute('say_participants_list'): - if bridge_el.getAttribute('say_participants_list') == 'false': - say_participants_list = False + say_level = 'all' + if bridge_el.hasAttribute('say_level'): + say_level = bridge_el.getAttribute('say_level') if bridge_el.hasAttribute('mode'): mode = bridge_el.getAttribute('mode') else: mode = 'normal' - bridge_ = bot_.new_bridge(xmpp_room.getAttribute('jid'), irc.getAttribute('chan'), irc.getAttribute('server'), mode, say_participants_list) + bridge_ = bot_.new_bridge(xmpp_room.getAttribute('jid'), irc.getAttribute('chan'), irc.getAttribute('server'), mode, say_level) while True: