Changeset 1101:c92b727a6ba1 for doc
- Timestamp:
- 02/17/07 22:29:39 (23 months ago)
- Branch:
- default
- Location:
- doc
- Files:
-
- 11 modified
-
COLLECTIVE (modified) (6 diffs)
-
FLEET (modified) (5 diffs)
-
FLOW (modified) (6 diffs)
-
OPER (modified) (1 diff)
-
PLUGINS (modified) (1 diff)
-
RELAY (modified) (2 diffs)
-
RSS (modified) (1 diff)
-
TOURDECODE (modified) (6 diffs)
-
UDP (modified) (2 diffs)
-
USER (modified) (1 diff)
-
WEBSERVER (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
doc/COLLECTIVE
r1097 r1101 9 9 10 10 Enable collective 11 ================= 11 ~~~~~~~~~~~~~~~~~ 12 12 :: 13 13 … … 16 16 17 17 Disable collective 18 ================== 18 ~~~~~~~~~~~~~~~~~~ 19 19 :: 20 20 … … 23 23 24 24 Boot the collective 25 =================== 25 ~~~~~~~~~~~~~~~~~~ 26 26 27 27 This wil copy the collective nodes list from a given server:port combo. … … 32 32 33 33 Copy all nodes list from all known nodes 34 ======================================== 35 : ;34 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 :: 36 36 37 37 < dunk> !coll-fullboot … … 39 39 40 40 See what nodes are active 41 ========================= 41 ~~~~~~~~~~~~~~~~~~~~~~~~~ 42 42 :: 43 43 44 44 < dunk> !coll-status 45 45 < gozerbot> 5 active nodes: ivitor .. hzt .. qqa .. r8 .. Noa 46 47 Commands48 ========49 46 50 47 Do a command on all the other collective bots … … 66 63 < gozerbot> (0.129984855652) -||r8||- GOZERBOT 0.5 HG revision 712 67 64 68 Nodes69 =====70 71 65 Add a node to the local collective list 72 66 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
doc/FLEET
r1097 r1101 9 9 10 10 Get a list of the bots in the fleet 11 =================================== 11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12 12 :: 13 13 … … 16 16 17 17 Add a irc bot to the fleet 18 ========================== 18 ~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 19 :: 20 20 … … 30 30 31 31 Add jabber bot 32 ============== 32 ~~~~~~~~~~~~~~ 33 33 (this can only be done on a jabber bot because of password 34 34 passing .. irc is not save, use a private chat to the jabberbot) … … 42 42 43 43 Make another bot join a channel 44 =============================== 44 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 45 45 :: 46 46 … … 51 51 52 52 Delete a bot 53 ============ 53 ~~~~~~~~~~~~ 54 54 :: 55 55 -
doc/FLOW
r1097 r1101 12 12 13 13 receive string and make it an ircevent 14 ====================================== 14 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15 15 16 16 in gozerbot/irc.py: … … 23 23 24 24 basic handling of the ircevent 25 ============================== 25 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 26 27 27 in gozerbot/bot.py: … … 57 57 58 58 command handling 59 ================ 59 ~~~~~~~~~~~~~~~~ 60 60 61 61 in gozerbot/bot.py: … … 118 118 119 119 callback handling 120 ================= 120 ~~~~~~~~~~~~~~~~~ 121 121 122 122 in gozerbot/callbacks.py: … … 148 148 # see if the callback pre requirement succeeds 149 149 if cb.prereq: 150 rlog(-10, 'callback', 'excecuting in loop %s' % \ 151 str(cb.prereq)) 150 rlog(-10, 'callback', 'excecuting in loop %s' % str(cb.prereq)) 152 151 if not cb.prereq(bot, ievent): 153 152 return … … 156 155 return 157 156 # start callback in its own thread 158 rlog(-10, 'callback', 'excecuting callback %s' % \ 159 str(cb.func)) 157 rlog(-10, 'callback', 'excecuting callback %s' % str(cb.func)) 160 158 if cb.threaded: 161 159 thr.start_new_thread(cb.func, (bot, ievent), cb.kwargs) 162 160 else: 163 161 cb.func(bot, ievent, **cb.kwargs) 164 165 ` -
doc/OPER
r1097 r1101 108 108 109 109 upgrading 110 ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~110 ~~~~~~~~ 111 111 112 112 -only for mercurial or svn bots- -
doc/PLUGINS
r1097 r1101 121 121 122 122 .. user related commands 123 124 30) worktimer125 126 .. implement a worktimer -
doc/RELAY
r1097 r1101 10 10 11 11 add a relay 12 =========== 12 ~~~~~~~~~~~ 13 13 14 14 relay-add <botname> <channel> <botname> <channel> … … 20 20 21 21 remove a relay 22 ============== 22 ~~~~~~~~~~~~~~ 23 23 :: 24 24 -
doc/RSS
r1097 r1101 5 5 __copyright__ = 'this file is in the public domain' 6 6 7 # first check if you have RSS permission: 7 first check if you have RSS permission 8 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 9 :: 8 10 9 <dunk> !perms10 <gozerbot> you have permissions = USER .. OPER11 <dunk> !perms 12 <gozerbot> you have permissions = USER .. OPER 11 13 12 # if this is not the case add it: 14 if this is not the case add it 15 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 16 :: 17 <dunk> !setperms dunk rss 18 <gozerbot> ok 13 19 14 <dunk> !setperms dunk rss 15 <gozerbot> ok 20 see which rss commands the bot has with 21 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 :: 23 <dunk> !apro rss 24 <gozerbot> 1) rss-url 2) rss-setsleeptime 3) rss-del 4) rss-add 5) 25 rss-delchannel 6) rss-delitemslist 7) rss-stopwatch 8) 26 rss-addchannel 9) rss-sleeptime 10) rss-list 11) rss-itemslist 12) 27 rss-scan 13) rss-watch 14) rss-running 15) rss-get 16) 28 rss-additemslist 16 29 17 # see which rss commands the bot has with: 30 you will want to add a url to the RSS system, we use slashdot as an example 31 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 :: 33 <dunk> !rss-add slash http://rss.slashdot.org/Slashdot/slashdot 34 <gozerbot> ok 18 35 19 <dunk> !apro rss 20 <gozerbot> 1) rss-url 2) rss-setsleeptime 3) rss-del 4) rss-add 5) 21 rss-delchannel 6) rss-delitemslist 7) rss-stopwatch 8) 22 rss-addchannel 9) rss-sleeptime 10) rss-list 11) rss-itemslist 12) 23 rss-scan 13) rss-watch 14) rss-running 15) rss-get 16) 24 rss-additemslist 36 see if the url works 37 ~~~~~~~~~~~~~~~~~~~~ 38 :: 39 <dunk> !rss-get slash 40 <gozerbot> 1) TV Piracy is Next 2) Smarter Phones Coming Soon 3) 7 41 Megapixel Camera Phone 4) Jon Bringing WMV9 to Linux 5) Wireless 42 Mouse with no Batteries 6) Blog Torrent Beta Released 7) Titanic 43 Director to Make Battle Angel Movie 8) Malware: Fighting Malicious 44 Code 9) Best Tools for Machinima? 10) Nmap Author Receives FBI 45 Subpoenas 25 46 26 # you will want to add a url to the RSS system, we use slashdot as an example: 47 to let the bot check for updates 48 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49 :: 50 <dunk> !rss-watch slash 51 <gozerbot> watcher thread started 27 52 28 <dunk> !rss-add slash http://rss.slashdot.org/Slashdot/slashdot 29 <gozerbot> ok 53 see if the thread is running 54 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 :: 56 <dunk> !rss-running 57 <gozerbot> 1) slash ['#dunkbots'] 30 58 31 # see if the url works: 59 if you want to stop watching 60 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 61 :: 62 <dunk> !rss-stopwatch slash 63 <gozerbot> ok 32 64 33 <dunk> !rss-get slash 34 <gozerbot> 1) TV Piracy is Next 2) Smarter Phones Coming Soon 3) 7 35 Megapixel Camera Phone 4) Jon Bringing WMV9 to Linux 5) Wireless 36 Mouse with no Batteries 6) Blog Torrent Beta Released 7) Titanic 37 Director to Make Battle Angel Movie 8) Malware: Fighting Malicious 38 Code 9) Best Tools for Machinima? 10) Nmap Author Receives FBI 39 Subpoenas 40 41 # to let the bot check for updates: 42 43 <dunk> !rss-watch slash 44 <gozerbot> watcher thread started 45 46 # see if the thread is running: 47 48 <dunk> !rss-running 49 <gozerbot> 1) slash ['#dunkbots'] 50 51 if you want to stop watching: 52 53 <dunk> !rss-stopwatch slash 54 <gozerbot> ok 55 56 # see what other data the rss feed has to offer: 57 58 <dunk> !rss-scan slash 59 <gozerbot> story = 20 author = 20 link = 20 section = 20 title = 20 60 comments = 20 topic = 20 time = 20 department = 20 image = 20 61 backslash = 1 65 see what other data the rss feed has to offer 66 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 67 :: 68 <dunk> !rss-scan slash 69 <gozerbot> story = 20 author = 20 link = 20 section = 20 title = 20 70 comments = 20 topic = 20 time = 20 department = 20 image = 20 71 backslash = 1 62 72 63 73 this counts the number of times a certain tag is found in the feed. 64 74 65 # so if we also want for example the link field added, you can add that item 66 # to the itemslist: 75 so if we also want for example the link field added, you can add that item to the itemslist 76 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 77 :: 78 <dunk> !rss-additemslist slash link 79 <gozerbot> ok 67 80 68 <dunk> !rss-additemslist slash link 69 <gozerbot> ok 70 71 # check: 72 73 <dunk> !rss-get slash 74 <gozerbot> 1) Cracking the Google Code... Under the GoogleScope - 75 http://slashdot.org/article.pl?sid=05/05/10/1546207 2) Broadway 76 Awards Spam - http://slashdot.org/article.pl?sid=05/05/10/1455206 3) 77 More on Last Years Cisco Source Code Theft - 78 http://slashdot.org/article.pl?sid=05/05/10/1339234 4) What Does a 79 Spreading Worm Look Like? - 80 http://slashdot.org/article.pl?sid=05/05/10/1333202 (+2) 81 check 82 ~~~~~ 83 :: 84 <dunk> !rss-get slash 85 <gozerbot> 1) Cracking the Google Code... Under the GoogleScope - 86 http://slashdot.org/article.pl?sid=05/05/10/1546207 2) Broadway 87 Awards Spam - http://slashdot.org/article.pl?sid=05/05/10/1455206 3) 88 More on Last Years Cisco Source Code Theft - 89 http://slashdot.org/article.pl?sid=05/05/10/1339234 4) What Does a 90 Spreading Worm Look Like? - 91 http://slashdot.org/article.pl?sid=05/05/10/1333202 (+2) 81 92 82 93 to remove use rss-delitemslist. 83 94 95 poll time 96 ~~~~~~~~~ 97 84 98 the bot will default poll once every 30 min. if you want the bot to poll 85 99 every x seconds you can use the rss-setsleeptime command (min is 60 seconds). -
doc/TOURDECODE
r1097 r1101 6 6 7 7 bot dir 8 ======= 8 ~~~~~~~ 9 9 :: 10 10 … … 25 25 26 26 gozerplugs 27 ========== 28 plugins that use mysql 27 ~~~~~~~~~~ 29 28 :: 30 29 31 30 $ ls 32 31 __init__.py dbplugs plugs web 33 34 (bart@dunker):~/gozerbot/tour/gozerbot/gozerplugs/dbplugs 35 $ ls 36 __init__.py infoitem.py quote.py user.py 37 birthday.py karma.py todo.py 38 39 birthday.py .. manages birthdays 40 karma.py .. manages karma 41 quote.py .. does the quotes thing 42 todo.py .. todo 43 user.py .. user related plugin 32 44 33 45 34 doc 46 === 35 ~~~ 47 36 :: 48 37 … … 66 55 67 56 files 68 ===== 57 ~~~~~ 69 58 :: 70 59 … … 91 80 92 81 gozerbot 93 ======== 82 ~~~~~~~~ 94 83 bots core code 95 84 :: … … 141 130 142 131 plugs 143 ===== 132 ~~~~~ 144 133 :: 145 134 146 (bart@dunker):~/gozerbot/tour/gozerbot/ plugs135 (bart@dunker):~/gozerbot/tour/gozerbot/gozerplugs/plugs 147 136 $ ls 148 137 __init__.py core.py infoitem.py misc.py tail.py … … 159 148 collective.py idle.py mailexceptions.py shop.py 160 149 convert.py ignore.py markov.py size.py 150 151 database plugs 152 ~~~~~~~~~~~~~~ 153 :: 161 154 162 see doc/PLUGINS for plugins documentation 155 (bart@dunker):~/gozerbot/tour/gozerbot/gozerplugs/dbplugs 156 $ ls 157 __init__.py infoitem.py quote.py user.py 158 birthday.py karma.py todo.py 163 159 160 birthday.py .. manages birthdays 161 karma.py .. manages karma 162 quote.py .. does the quotes thing 163 todo.py .. todo 164 user.py .. user related plugin 165 166 see doc/PLUGINS for plugins documentation 167 -
doc/UDP
r1097 r1101 10 10 11 11 udp config 12 ========== 12 ~~~~~~~~~~ 13 13 14 14 edit the following section in you data/config … … 28 28 29 29 limiter 30 ======= 30 ~~~~~~~ 31 31 32 32 bot's /msg to a user/channel are limited to 1 per 3 seconds so the bot will 33 33 not excessflood on the server. use partyudp if you need no delay between 34 34 sent messages, this will use dcc chat to deliver the message. 35 36 toudp 37 ~~~~~ 35 38 :: 36 39 -
doc/USER
r1097 r1101 7 7 8 8 user related commands 9 =====================10 9 11 10 user records -
doc/WEBSERVER
r1097 r1101 5 5 __copyright__ = 'this file is in the public domain' 6 6 7 # get help on the webserver plugin: 7 get help on the webserver plugin 8 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 9 :: 8 10 9 | bart | !help webserver10 | gozerbot | plugin description: maintain the bots webserver11 | gozerbot | commands: web .. web-allowip .. web-defaultallow ..12 web-defaultdeny .. web-denyip .. web-disable .. web-enable13 .. web-lists .. web-reload11 | bart | !help webserver 12 | gozerbot | plugin description: maintain the bots webserver 13 | gozerbot | commands: web .. web-allowip .. web-defaultallow .. 14 web-defaultdeny .. web-denyip .. web-disable .. web-enable 15 .. web-lists .. web-reload 14 16 15 # enable webserver: 17 enable webserver 18 ~~~~~~~~~~~~~~~~ 19 :: 20 | bart | !web-enable localhost 8087 21 | gozerbot | done 16 22 17 | bart | !web-enable localhost 8087 18 | gozerbot | done 23 see if webserver is running 24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 :: 26 | bart | !web 27 | gozerbot | web server is running at http://localhost:8087 19 28 20 # see if webserver is running: 29 set default to allow 30 ~~~~~~~~~~~~~~~~~~~~ 31 :: 32 | bart | !web-defaultallow 33 | gozerbot | ok 21 34 22 | bart | !web 23 | gozerbot | web server is running at http://localhost:8087 35 deny an ip 36 ~~~~~~~~~~ 37 :: 38 | bart | !web-denyip 127.0.0.1 39 | gozerbot | 127.0.0.1 denied 24 40 25 # set default to allow: 41 set default on deny 42 ~~~~~~~~~~~~~~~~~~~ 43 :: 44 | bart | !web-defaultdeny 45 | gozerbot | ok 26 46 27 | bart | !web-defaultallow 28 | gozerbot | ok 47 allow an ip 48 ~~~~~~~~~~~ 49 :: 50 | bart | !web-allowip 127.0.0.1 51 | gozerbot | 127.0.0.1 allowed 29 52 30 # deny an ip: 31 32 | bart | !web-denyip 127.0.0.1 33 | gozerbot | 127.0.0.1 denied 34 35 # set default on deny: 36 37 | bart | !web-defaultdeny 38 | gozerbot | ok 39 40 # allow an ip: 41 42 | bart | !web-allowip 127.0.0.1 43 | gozerbot | 127.0.0.1 allowed 44 45 # disable webserver: 46 47 | bart | !web-disable 48 | gozerbot | done 53 disable webserver 54 ~~~~~~~~~~~~~~~~~ 55 :: 56 | bart | !web-disable 57 | gozerbot | done
