Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __module_name__="Hug and cool"
- __module_version__="1.2.3"
- __module_description__="A hug return cooldown script on 10-second intervals"
- import hexchat
- allowHug=True
- myTimer=None
- def hugBack(a,b,c):
- global myTimer
- global allowHug
- if 'hugs' in a[1] or 'hug' in a[1]:
- pingerNick=a[0]
- if allowHug==True:
- hexchat.command("me hugs {} back <3".format(pingerNick))
- allowHug=False
- myTimer=hexchat.hook_timer(10000,timeOut)
- #10000 in the above ^ is means 10000 milliseconds, or 10 seconds. Every 10 seconds, it calls the timeOut function.
- #The timer starts AFTER 10 seconds, not ON 0
- def timeOut(userdata):
- global allowHug
- global myTimer
- if allowHug==False:
- allowHug=True
- hexchat.unhook(myTimer)
- else:
- hexchat.unhook(myTimer)
- hexchat.hook_print("Channel Action hilight",hugBack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement