4
0

README 7.7 KB

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