jacob614

CTCP script

Jan 10th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | None | 0 0
  1. def ctcp_hook(word, word_eol, userdata):
  2.     ctcptype = word[0]
  3.     user = word[1]
  4.     if ("BANME" in ctcptype.upper() or "OPME" in ctcptype.upper()) and "freenode" in hexchat.get_info("server") and user != "^v":
  5.         if <some special check here>:
  6.             send("cs op <channel> jacob1")
  7.             hexchat.hook_timer(1000, ban_timer, ["+b", 614*1000, user, hexchat.get_info("server"), "<channel>"])
  8.             hexchat.hook_timer(1000, kick_timer, [word[1], hexchat.get_info("server"), "<channel>", "Recieved a CTCP BANME from " + user])
  9.             hexchat.hook_timer(1000, command_timer, ["cs deop <channel> jacob1", hexchat.get_info("server"), "<channel>"])
  10.         elif get_user(word[1], hexchat.get_info("server"), "#powder"):
  11.             do_ban("+b", 614*1000, user, hexchat.get_info("server"), "#powder")
  12.             user_kick(word[1], hexchat.get_info("server"), "#powder", "Recieved a CTCP BANME from " + user)
Advertisement
Add Comment
Please, Sign In to add comment