# Using this script you will be automatically sbanned from a channel. # Author: eKoeS (http://www.lineheight.net) # ----- # NOTE: This script might be slow in some cases. Please use it carefully. # CHANGELOG # # 1.1 + mod 0.5 # # CHANGED Minor fixes. # # # 1.1 # # CHANGED Incremented script's time reaction, using threads. # # ----- __module_name__ = "auto-unbanner" __module_version__ = "1.1 + mod 0.5" __module_description__ = "Automatically unban yourself from a channel." __module_author__ = "Base engine: eKoeS , Mod: Legolas_Vf " import xchat, thread def unban(word, word_eol, userdata): if word[3] == "+b": autounbanme(word[2], word[4], word[0]) elif word[3] == "-o+b" or word[3] == "+b-o": autounbanme(word[2], word[5], word[0]) return xchat.EAT_NONE def autounbanme(channel, mask, kicker): for user in xchat.get_list("users"): if user.nick == xchat.get_info("nick") and (user.prefix == "@" or user.prefix == "%" or user.prefix == "+"): banned = searchban(mask, user.host, user.nick) if banned == 1: thread.start_new_thread(unban_thread, (channel,)) return xchat.EAT_NONE def searchban(banmask, mymask, mynick): try: user = mymask.split("@")[0] domain = mymask.split("@")[1] host = domain.replace(domain.split(".")[0],"") except IndexError: print "Error! I can't read this mask." else: if host in banmask or mynick in banmask or user in banmask: return 1 else: return 0 return xchat.EAT_NONE def unban_thread(channel): xchat.command("cs unban %s me" % "".join(channel)) return xchat.EAT_NONE xchat.hook_server("MODE", unban) xchat.hook_server("KICK", unban) print "Auto-Unbanner versione %s caricato correttamente." % __module_version__