Skip to content

Instantly share code, notes, and snippets.

@sarahhodne
Created September 28, 2008 18:47
Show Gist options
  • Save sarahhodne/13489 to your computer and use it in GitHub Desktop.
Save sarahhodne/13489 to your computer and use it in GitHub Desktop.
__module_name__ = "autojoin"
__module_version__ = "1.0"
__module_description__ = "Auto-rejoiner for non-cluenet servers."
import xchat
joinhook = None
def rejoin_cb(userdata):
xchat.command("j %s" % userdata)
return False
def kick_cb(word, word_eol, userdata):
if xchat.get_info("server").find("cluenet") == -1:
joinhook = xchat.hook_timer(3000, rejoin_cb, word[2])
#xchat.command("j %s" % word[2])
return xchat.EAT_NONE
xchat.hook_server("KICK", kick_cb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment