luca020400

shawn.py

May 13th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.23 KB | None | 0 0
  1. From 986118d8c61e5399d0052a887c095ca679bc0748 Mon Sep 17 00:00:00 2001
  2. From: luca020400 <luca.stefani.ge1@gmail.com>
  3. Date: Wed, 13 May 2015 20:07:40 +0200
  4. Subject: [PATCH] supybot: add Shawn
  5.  
  6. ---
  7.  plugin.py | 13 +++++++++++++
  8.  1 file changed, 13 insertions(+)
  9.  
  10. diff --git a/plugin.py b/plugin.py
  11. index 196c167..4846fce 100644
  12. --- a/plugin.py
  13. +++ b/plugin.py
  14. @@ -8,6 +8,7 @@ try:
  15.      from supybot.i18n import PluginInternationalization
  16.      from supybot.i18n import internationalizeDocstring
  17.      _ = PluginInternationalization('Anus')
  18. +    _ = PluginInternationalization('Shawn')
  19.  except:
  20.      # This are useless functions that's allow to run the plugin on a bot
  21.      # without the i18n plugin
  22. @@ -31,3 +32,15 @@ class Anus(callbacks.Plugin):
  23.              irc.reply("Hey, you used Anas instead of Anus ;-;")
  24.  
  25.  Class = Anus
  26. +
  27. +@internationalizeDocstring
  28. +class Shawn(callbacks.Plugin):
  29. +    @internationalizeDocstring
  30. +
  31. +    def doJoin(self, irc, msg):
  32. +        if irc.isChannel("#titandev"):
  33. +            nick = msg.nick or irc.nick
  34. +            if "Shawn5162" in nick.lower() or "Shawn" in nick.lower():
  35. +                irc.queueMsg(ircmsgs.kick(msg.args[0], nick.lower, 'I am SupyBot '))
  36. +
  37. +Class = Shawn
  38. --
  39. 2.4.0
Advertisement
Add Comment
Please, Sign In to add comment