Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __module_name__ = "Notices Handler"
- __module_version__ = "1.0"
- __module_description__ = "Take over handling of notices and send those from *@services.* to active window"
- import xchat, fnmatch
- # :ChanServ!ChanServ@services.phuzion.net NOTICE knivey :knivey is gleaming (IRC operator).
- def Hnotices(word, word_eol, userdata):
- nick,host = word[0].split('!', 1)
- nick = nick[1:]
- message = word_eol[3][1:]
- if fnmatch.fnmatch(host.lower(), "*@services.*") and word[2][1] != '#':
- context = xchat.find_context();
- context.set();
- context.emit_print("Notice",nick,message);
- return xchat.EAT_ALL
- else:
- return xchat.EAT_NONE
- xchat.hook_server("NOTICE", Hnotices)
Add Comment
Please, Sign In to add comment