diff --git a/README.md b/README.md index c252614..8704af0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Before you can run the bot, you need to install a few Python modules. These are ```sudo apt-get install python-beautifulsoup ``` -For the spell.py plugin to work you need *python-enchant*. This can be installed with: +For the spell.py plugin to work you need *Enchant*. This can be installed with: ```sudo apt-get install python-enchant ``` diff --git a/docs/bots b/docs/bots index c78274d..9c8bc08 100644 --- a/docs/bots +++ b/docs/bots @@ -10,16 +10,16 @@ pyfibot http://code.google.com/p/pyfibot/ - interesting, but lots of magic rbot http://linuxbrit.co.uk/rbot/ - - Ruby + - ruby - lots of plugins pyirc http://www.k-pdt.net/pyirc/ - very simple, not multithreaded - - poor use of regexes, skybot has much better parsing, but it implements many more irc control codes + - poor use of regexes, CloudBot has much better parsing, but it implements many more irc control codes - can convert irc colors to vt100 escape codes -- should implement this - autoreconnect -pybot +pybot http://labix.org/pybot - can handle multiple servers, but not multithreaded - ugly modules - too many external dependencies diff --git a/docs/interface b/docs/interface index 92ce1ee..a9af4fb 100644 --- a/docs/interface +++ b/docs/interface @@ -1,11 +1,12 @@ GOALS: -simplicity -as little boilerplate and magic as possible -multithreaded dispatch +* simplicity +* as little boilerplate and magic as possible +* multithreaded dispatch plugins are located in plugins/ input: + nick -- string, the nickname of whoever sent the message channel -- string, the channel the message was sent on. Equal to nick if it's a private message. msg -- string, the line that was sent @@ -13,6 +14,7 @@ raw -- string, the raw full line that was sent re -- the result of doing re.match(hook, msg) attributes and methods of bot: + say(msg): obvious reply(msg): say(input.nick + ": " + msg) msg(target, msg): sends msg to target diff --git a/docs/plugins b/docs/plugins index 430d1b0..9c481ef 100644 --- a/docs/plugins +++ b/docs/plugins @@ -1,7 +1,9 @@ All plugins need to 'from util import hook' if they want to be callable. There are three ways to set when a plugin is called using -decorators. @hook.command causes it to be callable using normal command +decorators. + +@hook.command causes it to be callable using normal command syntax; an argument will register it under that name (so if my function is called foo and I use @hook.command, .foo will work; if I use @hook.command("bar"), .bar will work but not .foo). The first argument, inp,