#!/usr/bin/python import time import xchat __module_name__ = "xchat_bitlbee" __module_version__ = "0.1" __module_description__ = "Logs in and joins jabber chat channels automatically." __module_author__ = "Michael Watters " def unload_cb(userdata): print "Plugin xchat_bitlbee unloaded!" def join_rooms(word, word_eol, userdata): CHANNELS = [ "support", "sys-restore", "monitoring", "offtopic" ] for channel in CHANNELS: cnc = xchat.find_context(server='Bitlbee', channel='&bitlbee') cnc.command("say join_chat 0 %s@conference.example.com &%s" %(channel, channel)) time.sleep(1) print "Plugin xchat_bitlbee loaded!" xchat.hook_command("bitljoin", join_rooms, help="/bitljoin joins the selected jabber channels.") xchat.hook_unload(unload_cb) # vim:ts=4:sw=4:et