Commits

Rune Halvorsen committed 50d31fe

Initial commit

Comments (0)

Files changed (4)

+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+                    Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. You just DO WHAT THE FUCK YOU WANT TO.
+
+Like bot.
+
+Responds to !like, does nothing useful.
+#!python
+
+from setuptools import setup
+
+setup(name = "tehzuck",
+      version = "0.1",
+      description = "sgt_lenins super extravaganza like bot!",
+      license = "WTFPL",
+      keywords = "command line scripting",
+      url = "http://bitbucket.org/runeh/tehzuck",
+      zip_safe = False,
+      install_requires = ['irckit', 'baker'],
+      scripts = ["tehzuck.py"],
+      classifiers = ["Development Status :: 4 - Beta",
+                     "Operating System :: OS Independent",
+                     "Programming Language :: Python",
+                     ]
+      )
+__version__ = "0.1"
+
+from irc import IRCBot, run_bot
+import baker
+
+class ZuckBot(IRCBot):
+    def command_patterns(self):
+        return (
+            ('^!like', self.handle_like),
+        )    
+
+    def handle_like(self, nick, message, channel):
+        return '%s er idiot' % nick
+
+@baker.command
+def run(host, channel, port=6667, nick="tehzuck"):
+    """Run zuck bot.
+
+    :param host: IRC server address.
+
+    :param channel: IRC channel to join.
+
+    :param port: IRC server port.
+
+    :param nick: Nickname to use for bot.
+    """
+    try:
+        run_bot(ZuckBot, host, port, nick, [channel])
+    except KeyboardInterrupt:
+        print "Shutting down"
+        # cleanup goes here
+
+baker.run()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.