Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hexchat
- __module_name__ = "znc server time fix"
- __module_version__ = "1.0"
- __module_description__ = "Removes the znc.in/server-time-iso capability once it is no longer needed"
- removed = {}
- def bufferended(word, word_eol, userdata):
- server = hexchat.get_info("server")
- if server not in removed:
- #hexchat.prnt("removing znc.in/server-time-iso capability")
- hexchat.command("CAP REQ -znc.in/server-time-iso")
- removed[server] = True
- def quit(word, word_eol, userdata):
- # Would use hexchat.get_info("server"), but that returns None
- removed.clear()
- hexchat.hook_server("329", bufferended) # Seems to be sent after buffextras finishes, can't remember what it is
- hexchat.hook_print("Disconnected", quit)
Advertisement
Add Comment
Please, Sign In to add comment