Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update readme

  • Loading branch information...
commit db7377ac5457f3218c8134b97e0e12ce9cdef1f5 1 parent 03748c1
@NightKev authored
Showing with 9 additions and 8 deletions.
  1. +8 −7 README.md
  2. +1 −1  __init__.py
  3. 0  alias.py
View
15 README.md
@@ -1,7 +1,8 @@
-This bot requires the [IRCUtils framework][1] ([Install guide][2]) and [Python 2.7.x][3] (afaict, it should also work in Python 2.6.x (untested), and *maybe* 2.5.x with a minimal amount of tweaking; it almost definitely won't work pre-2.5 without some non-trivial modification though).
+This bot requires the [IRCUtils framework][1] ([Install guide][2] and [Download][4]) and [Python 2.7.x][3] (afaict, it should also work in Python 2.6.x (untested), and *maybe* 2.5.x with a minimal amount of tweaking; it almost definitely won't work pre-2.5 without some non-trivial modification though).
[1]: http://dev.guardedcode.com/projects/ircutils
-[2]: http://dev.guardedcode.com/docs/ircutils/installation.html
+[2]: http://dev.guardedcode.com/docs/ircutils/installation.html#installing-from-source
[3]: http://python.org
+[4]: http://dev.guardedcode.com/hg/ircutils/archive/b611aefde646.tar.gz
Creating bot functions
-----
@@ -13,15 +14,15 @@ To be executed, you must define the function `main` with the parameters `self, a
If you want to restrict the function to users with administrator privileges, you must add a call to `self.reqadmin(<name of function>)` at the top of `main()`, similar to this:
def main(self, args, event):
- if not self.reqadmin('quit', event.host): # assuming the function name is 'quit'
- self.send_message(event.source,"This function is restricted to administrators only.")
+ if not self.req_admin('quit', event.host): # assuming the function name is 'quit'
+ self.send_message(event.target,"This function is restricted to administrators only.")
return
If you want to restrict the function to only work in queries, add the following check to `main()`:
- if event.target != event.source: return # if the message was sent to a channel, event.target will be set to the channel name
- # otherwise it will be the same as the nick of the user sending the message
- # change the "!=" into a "==" to make it work only in channels
+ if event.target != event.source: # if the message was sent to a channel, event.target will be set to the channel name
+ return # otherwise it will be the same as the nick of the user sending the message
+ # change the "!=" into a "==" to make it work only in channels
Quick Changelog
-----
View
2  __init__.py
@@ -1,4 +1,4 @@
# Copyright (c) 2011 Kevin Skusek
# The full copyright notice can be found in the file LICENSE
-__all__ = ['parseargs','pybot']
+__all__ = ['parseargs','spirebot','alias']
View
0  alias.py
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.