Mercurial > xib
diff start_bots_from_xml_config.py @ 172:64a0e9636ae6
removed encoding.py, charsets handling is now in irclib and custom charsets can be set per server in the configuration file
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Tue, 02 Feb 2010 20:19:50 +0100 |
parents | 489c157d9e82 |
children | 102f895347ff |
line wrap: on
line diff
--- a/start_bots_from_xml_config.py +++ b/start_bots_from_xml_config.py @@ -65,6 +65,10 @@ for bot_el in config.getElementsByTagNam irc_connection_interval = float(irc.getAttribute('connection_interval')) except ValueError: print '[Error] the value of connection_interval must be a number' + if irc.hasAttribute('charsets'): + irc_charsets = irc.getAttribute('charsets').split() + else: + irc_charsets = None if bridge_el.hasAttribute('say_level'): say_level = bridge_el.getAttribute('say_level') @@ -76,7 +80,7 @@ for bot_el in config.getElementsByTagNam else: mode = 'normal' - bot.new_bridge(xmpp_room.getAttribute('jid'), irc.getAttribute('chan'), irc.getAttribute('server'), mode, say_level, irc_connection_interval=irc_connection_interval) + bot.new_bridge(xmpp_room.getAttribute('jid'), irc.getAttribute('chan'), irc.getAttribute('server'), mode, say_level, irc_connection_interval=irc_connection_interval, irc_charsets=irc_charsets) try: if len(bots) == 0: