SHARE
TWEET

Untitled

a guest Dec 14th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. __module_name__ = "Notices Handler"
  2. __module_version__ = "1.0"
  3. __module_description__ = "Take over handling of notices and send those from *@services.* to active window"
  4.  
  5. import xchat, fnmatch
  6.  
  7. # :ChanServ!ChanServ@services.phuzion.net NOTICE knivey :knivey is gleaming (IRC operator).
  8. def Hnotices(word, word_eol, userdata):
  9.     nick,host = word[0].split('!', 1)
  10.     nick = nick[1:]
  11.     message = word_eol[3][1:]
  12.     if fnmatch.fnmatch(host.lower(), "*@services.*") and word[2][1] != '#':
  13.         context = xchat.find_context();
  14.             context.set();
  15.             context.emit_print("Notice",nick,message);
  16.         return xchat.EAT_ALL
  17.     else:
  18.         return xchat.EAT_NONE
  19. xchat.hook_server("NOTICE", Hnotices)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top