Advertisement
Guest User

Untitled

a guest
Jun 1st, 2011
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.02 KB | None | 0 0
  1. Description:
  2. ------------
  3.  
  4. Stats.mod generates statistics about the users in a channel. It counts
  5. the words that the users have spoken, the lines, actions, smileys,
  6. joins, quits, mode changes, topic changes, nick changes, kicks and how
  7. long the user has been on the channel. Depending on the configuration,
  8. it even logs the user's favourite words and the most used words on
  9. the channel.
  10.  
  11. The statistics are accessable via public commands (!top10, !stat...)
  12. and via http.
  13.  
  14.  
  15. Installation:
  16. -------------
  17.  
  18. Stats.mod will work with eggdrop1.6.x and eggdrop1.4.x.
  19.  
  20. The following instructions assume, ~/eggdrop1.6/ is the directory
  21. where you installed your eggdrop from. (of course, other source dirs
  22. will work as well)
  23. Unfortunately, you need to compile stats.mod within your eggdrop source,
  24. so if you removed your original compile directory, you'll have to
  25. compile the whole bot again... sorry.
  26.  
  27. Put stats.mod.1.3.2.tar.gz in ~/eggdrop1.6/src/mod/,
  28. and unpack it (tar xfz stats.mod.1.3.2.tar.gz). Change directory
  29. back to ~/eggdrop1.6/. Type 'make config' (on eggdrop 1.4, you can skip
  30. that part) Type 'make', wait until compiling
  31. is done and use 'make install' to install the bot and stats.mod.
  32.  
  33. Don't forget to copy the language files from ~/eggdrop1.6/src/mod/stats.mod/ to
  34. ~/eggdrop/language/ !
  35.  
  36. All settings can be found in ~/eggdrop1.6/src/mod/stats.mod/stats.conf
  37. I suggest to copy it to your eggdrop directory (probably ~/eggdrop/),
  38. edit it to fit your needs and put a 'source stats.conf' at the end of
  39. your eggdrop config file. This will execute the config file with every
  40. restart or rehash.
  41.  
  42.  
  43.  
  44. Public commands:
  45. ----------------
  46.  
  47. !top10 [ordering]
  48. lists the top10 users in the channel
  49. !top20 [ordering]
  50. same as !top10, but lists the top20 (surprise!)
  51. !stat [user]
  52. shows the statistics for the user
  53. !place [user/ordering]
  54. shows on which place the user is
  55. !ttop10/!ttop20/!tstat/!tplace
  56. same as above, but only uses the statistics of today
  57.  
  58. Only available if log-wordstats is turned on:
  59. !wordstats [user]
  60. lists the most used words of the user
  61. !topwords
  62. lists the most used words in the channel
  63. !top10 word <word>
  64. lists the top10 people who used <word>
  65.  
  66. Msg commands:
  67. -------------
  68.  
  69. All public commands are also accessible via /msg.
  70. ("/msg <bot> top10 #chan", for example)
  71.  
  72.  
  73. Additionally, there are two new commands:
  74.  
  75. /msg <bot> setemail <email-address>
  76. sets your email address
  77. /msg <bot> sethomepage <homepage-address>
  78. sets the URL of your homepage
  79.  
  80. DCC commands:
  81. -------------
  82.  
  83. .+suser <user> [host]
  84. adds a new user to the database
  85. .-suser <user>
  86. removes a user from the database
  87. .+shost <user> <hostmask>
  88. adds a new hostmask to <user>
  89. .-shost <user> <hostmask>
  90. removes a hostmask from <user>
  91. .smatch [mask] [+/-list] [+/-addhosts]
  92. lists all matching users
  93. .schannel #chan
  94. displays the stats-users in a channel
  95. .schattr <user> <flags>
  96. changes the flags for a stats user
  97. .chsusername <oldname> <newname>
  98. changes the name of a user in the stats database
  99. .purgestats
  100. deletes stats for non-existant users, empty stats and deletes expired users.
  101. (m|-)
  102. .sumuser <user1> <user2>
  103. adds all statistics of user2 to user1 and deletes user2
  104. (n|-)
  105. .resetuser <user> <channel>
  106. sets all statistics of user in channel to 0
  107. (m|-)
  108.  
  109. .writewebstats
  110. writes the old, static webfiles
  111. (m|-)
  112.  
  113. TCL commands:
  114. -------------
  115.  
  116. incrstats <user> <chan> <type> <value> [set]
  117. increases the statistics of type <type> in <chan> for <user> by <value>.
  118. If <set> is 1, the stats are not increased but set to the value.
  119.  
  120. getstats <user> <chan> <type> [today]
  121. returns the stats of <user> in <chan> of type <type>. If <today> is 1,
  122. the statistics of today are returned.
  123.  
  124. livestats <port>
  125. starts listening for livestats connections on port <port>.
  126. If <port> is "off" or "0", the bot will stop listening.
  127.  
  128. resetuser <user> <channel>
  129. sets all statistics of user in channel to 0
  130.  
  131. resetslang
  132. removes every language from the memory, so you can cleanly load a new
  133. set of languages.
  134.  
  135. loadslang [lang] <langfile>
  136. loads a language
  137.  
  138. setchanslang <channel> <language>
  139. sets the language in <channel> to <language>
  140.  
  141. nick2suser <nick> <channel>
  142. returns the username of <nick> in <chan>
  143.  
  144.  
  145. Livestats:
  146. ----------
  147.  
  148. If you activate livestats, your bot will listen on a specified port for
  149. http connections. (accessable via http://your.shell.com:8033/, for example)
  150. The webfiles will then be generated on the fly. There will also be a little
  151. channel and user list which makes it easier for your users to browse through
  152. the several channel statistics of your bot.
  153. This method also uses less cpu power than the frequently written webfiles,
  154. because only the file that is really needed is generated.
  155. Use .console +1 to see access, or use the setting stats-loglevel to
  156. change the loglevel.
  157. Stats.mod is now also able to log the access to a CLF logfile, so you can
  158. use your favourite loganalyzer to generate stats of the stats access. :)
  159.  
  160. Hint: If you don't want a channel to be listed on the index,
  161. ---- just set it +secret.
  162.  
  163. Static Webfiles:
  164. ---------------
  165.  
  166. If there's really no way to use livestats, stats.mod can also generate static
  167. web files.
  168. In this case, it simply mirrors the whole livestats server into a directory
  169. on your shell. Of course, this takes some time. You bot won't be able to
  170. do anything while it's generating the files, so only use it if there's no
  171. other way. (expect an occasional ping timeout on large channels)
  172. Be sure that you chose an empty output directory.
  173.  
  174. User management:
  175. ----------------
  176.  
  177. Since v1.3.0, stats.mod has an internal userdatabase. It can automatically
  178. add users and hostmasks to it. Users which are in the eggdrop userfile have a
  179. higher priority, so if someone is known as "bla" by the bot and as "blub"
  180. by stats.mod, his stats will be logged to "bla".
  181. Hostmasks will be removed from a user if they haven't been used for a
  182. specified time. If all hosts got removed from a user, the user will be erased
  183. completely.
  184. Note that stats.mod can't know when someone used IDENT or if someone added
  185. new hosts to a user manually. The affected user should cycle the chan to make
  186. sure that he's recognized correctly by stats.mod.
  187.  
  188. There are two flags for users: +/-list and +/-addhosts:
  189. - If a user has the flag -list, he/she/it won't be listed in the top10. (you
  190. probably want to set all your bot -list)
  191. - If a user is -addhosts, no new hostmasks will be added to him/her. You'll
  192. have to add all hosts manually with .+shost. (useful if someone if trying
  193. to fake you)
  194.  
  195. Channel settings:
  196. -----------------
  197.  
  198. If you're using eggdrop 1.5 or later, you have some additional config options
  199. available via .chanset:
  200.  
  201. +nopubstats
  202. Disables all channel commands (!top10 etc...)
  203. +quietstats
  204. Bot will reply with a notice directly to the user instead of
  205. sending the reply to the channel
  206. +nostats
  207. Don't log any stats in this chan at all.
  208.  
  209. Other:
  210. ------
  211.  
  212. There is absolutely NO WARRANTY on this module. I do my best to make it
  213. work properly, but if anything gets screwed up, I'm not responsible. Use
  214. this module at your own risk.
  215.  
  216. Known problems:
  217. ---------------
  218.  
  219. There can be a problem if you use wordstats on a bot with enabled memory
  220. debugging. The reset of the daily stats might take a long time on slow shells.
  221. If your bot is on big channels, your memory table might be too small.
  222. Edit src/mem.c and change the #define that sets the size of the memtable
  223. (#define MEMTBLSIZE 25000 /* yikes! */) to a higher value.
  224.  
  225. Feedback:
  226. ---------
  227.  
  228. Feel free to send feedback and bugreports(I hope there won't be any<g>) to
  229. stats.mod@visions-of-fantasy.de
  230.  
  231. Homepage:
  232. ---------
  233.  
  234. The latest version of stats.mod(and a few addons) can always be found at
  235. http://www.visions-of-fantasy.de/stats.mod/
  236.  
  237. Thanks to:
  238. ----------
  239.  
  240. - Fabian for teaching me plenty of things
  241. - Johoho and Fox_Muld for various bug reports and suggestions
  242. - dw for the idea of livestats and for many bug reports
  243. - the eggdev team for developing eggdrop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement