Advertisement
Guest User

XChat / ignore.py

a guest
Jun 15th, 2010
1,124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.29 KB | None | 0 0
  1. #
  2. #  Copyright (C) 2010, Suhana <scripts@suhana.co.uk>
  3. #  All Rights Reserved.
  4. #
  5. #  Redistribution and use in source and binary forms, with or without
  6. #  modification, are permitted provided that the following conditions are met:
  7. #
  8. #  * Redistributions of source code must retain the above copyright notice,
  9. #    this list of conditions and the following disclaimer.
  10. #
  11. #  * Redistributions in binary form must reproduce the above copyright notice,
  12. #    this list of conditions and the following disclaimer in the documentation
  13. #    and/or other materials provided with the distribution.
  14. #
  15. #  * Neither the copyright holder nor the names of their contributors may be
  16. #    used to endorse or promote products derived from this software without
  17. #    specific prior written permission.
  18. #
  19. #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS
  20. #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  21. #  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  22. #  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  23. #  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  24. #  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  25. #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  26. #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  27. #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  28. #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  29. #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30.  
  31. import xchat
  32.  
  33. __module_name__        = "ignore"
  34. __module_version__     = "0.1"
  35. __module_description__ = "Can ignore things!"
  36.  
  37. # event handlers
  38.  
  39. def allow_it(word, word_eol, userdata):
  40.     return xchat.EAT_NONE
  41.  
  42. def ignore_it(word, word_eol, userdata):
  43.     return xchat.EAT_XCHAT
  44.  
  45. # hook events (See Settings/Advanced/Text Events)
  46.  
  47. xchat.hook_print("Change Nick",      ignore_it)
  48. xchat.hook_print("Channel Voice",    ignore_it)
  49. xchat.hook_print("Channel Operator", ignore_it)
  50. xchat.hook_print("Join",             ignore_it)
  51. xchat.hook_print("Part",             ignore_it)
  52. xchat.hook_print("Part with Reason", ignore_it)
  53. xchat.hook_print("Quit",             ignore_it)
  54.  
  55. # that's it!
  56.  
  57. print "\002ignore.py\002 loaded"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement