a guest Dec 14th, 2018 53 Never
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.split('!', 1)
- nick = nick[1:]
- message = word_eol[1:]
- if fnmatch.fnmatch(host.lower(), "*@services.*") and word != '#':
- context = xchat.find_context();
- return xchat.EAT_ALL
- return xchat.EAT_NONE
- xchat.hook_server("NOTICE", Hnotices)
RAW Paste Data