# Using this script you will automatically rejoin the channel from which you've been kicked. # Author: eKoeS (http://www.lineheight.net) # CHANGELOG # # 1.1 # # CHANGED Incremented script's time reaction, using threads. # # ----- __module_name__ = "rejoinonkick" __module_version__ = "1.1" __module_description__ = "Automatically rejoin when kicked from a channel." import xchat def rejoin_thread(channel): import time time.sleep(0.1) xchat.command("join " + "".join(channel)) def invite_thread(channel): xchat.command("cs invite " + "".join(channel)) def rejoin(word, word_eol, userdata): import thread if word[3] == xchat.get_info("nick"): for user in xchat.get_list("users"): if [user.nick == xchat.get_info("nick") and (user.prefix == "@" or user.prefix == "%" or user.prefix == "+")]: thread.start_new_thread(invite_thread, (word[2],)) break thread.start_new_thread(rejoin_thread, (word[2],)) return xchat.EAT_NONE xchat.hook_server("KICK", rejoin) print "Module \"%s\" v.%s loaded correctly!" % (__module_name__,__module_version__)