import xchat
hooker = None
__module_name__ = "Away Script"
__module_version__ = '1.0'
__module_description__ = "States that your away"
def away(word, word_eol, userdata):
chan = xchat.get_info('channel')
xchat.command("msg " + chan + " I'm Away")
def toggle(word, word_eol, userdata):
global a
if word[1] == 'on':
xchat.hook_print("Channel Msg Hilight", away)
xchat.command("echo Loaded")
elif word[1] == 'off':
xchat.unhook(a)
hooker = None
xchat.command("echo Unloaded")
else:
xchat.command("echo Use /a on or /a off")
return xchat.EAT_ALL
xchat.hook_command("a", toggle)
a = xchat.hook_print("Channel Msg Hilight", away)
xchat.command("a off")
nevets04 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.