README 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. Description:
  2. ------------
  3. Stats.mod generates statistics about the users in a channel. It some data about
  4. the users like spoken words, lines, time spent in the channel, etc...
  5. It makes those stats accessible either via commands in the channel (!top, ...),
  6. or through an included webserver which generates statistic-webpages in
  7. rea-time ("livestats").
  8. A demonstration of this functionality can be found on the homepage of
  9. this module: http://www.visions-of-fantasy.de/stats.mod/
  10. Installation:
  11. -------------
  12. Stats.mod will work with eggdrop1.6.x and probably eggdrop1.4.x.
  13. The following instructions assume, ~/eggdrop1.6/ is the directory
  14. where you installed your eggdrop from. (of course, other source dirs
  15. will work as well)
  16. Unfortunately, you need to compile stats.mod within your eggdrop source,
  17. so if you removed your original compile directory, you'll have to
  18. compile the whole bot again... sorry.
  19. Put stats.mod.1.4.0.tar.gz in ~/eggdrop1.6/src/mod/,
  20. and unpack it (tar xfz stats.mod.1.4.0.tar.gz). Change directory
  21. back to ~/eggdrop1.6/. Type 'make config' (on eggdrop 1.4, you can skip
  22. that part) Type 'make', wait until compiling
  23. is done and use 'make install' to install the bot and stats.mod.
  24. Don't forget to copy the language files from
  25. ~/eggdrop1.6/src/mod/stats.mod/language/ to ~/eggdrop/language/
  26. and the templates from
  27. ~/eggdrop1.6/src/mod/stats.mod/templates to ~/eggdrop/templates/!
  28. All settings can be found in ~/eggdrop1.6/src/mod/stats.mod/stats.conf
  29. I suggest to copy it to your eggdrop directory (probably ~/eggdrop/),
  30. edit it to fit your needs and put a 'source stats.conf' at the end of
  31. your eggdrop config file. This will execute the config file with every
  32. restart or rehash.
  33. Public commands:
  34. ----------------
  35. !top [num] [today|weekly|monthly|total] [ordering]
  36. lists the top[num] users in the channel
  37. !stat [user]
  38. shows the statistics for the user
  39. !place [user/ordering]
  40. shows on which place the user is
  41. !lastspoke <user>
  42. shows when the user has last spoken a word on the channel
  43. (this isn't the same as the idle-time which other script provide with this
  44. command, since the idle time also changes with join/part/etc. This command
  45. return when a user really has sent some text to the channel)
  46. Only available if log-wordstats is turned on:
  47. !wordstats [user]
  48. lists the most used words of the user
  49. !topwords
  50. lists the most used words in the channel
  51. !top word <word>
  52. lists the top10 people who used <word>
  53. Msg commands:
  54. -------------
  55. All public commands are also accessible via /msg.
  56. ("/msg <bot> top #chan", for example)
  57. Additionally, there are two new commands:
  58. /msg <bot> statspass <password>
  59. with this command, a user can set a password for his statistics-account,
  60. so he can log on at the webpage and edit his settings
  61. DCC commands (for administration):
  62. -------------
  63. .savestats
  64. saves the database now
  65. .+suser <user> [host]
  66. adds a new user to the database
  67. .-suser <user>
  68. removes a user from the database
  69. .+shost <user> <hostmask>
  70. adds a new hostmask to <user>
  71. .-shost <user> <hostmask>
  72. removes a hostmask from <user>
  73. .smatch [mask] [+/-list] [+/-addhosts]
  74. lists all matching users
  75. .schannel #chan
  76. displays the stats-users in a channel
  77. .schattr <user> <flags>
  78. changes the flags for a stats user
  79. .chsusername <oldname> <newname>
  80. changes the name of a user in the stats database
  81. .purgestats
  82. deletes stats for non-existant users, empty stats and deletes expired users.
  83. (m|-)
  84. .sumuser <user1> <user2>
  85. adds all statistics of user2 to user1 and deletes user2
  86. (n|-)
  87. .resetuser <user> <channel>
  88. sets all statistics of user in channel to 0
  89. (m|-)
  90. .swhois
  91. displays a stats-account
  92. TCL commands:
  93. -------------
  94. incrstats <user> <chan> <type> <value> [set]
  95. increases the statistics of type <type> in <chan> for <user> by <value>.
  96. If <set> is 1, the stats are not increased but set to the value.
  97. getstats <user> <chan> <type> [today]
  98. returns the stats of <user> in <chan> of type <type>. If <today> is 1,
  99. the statistics of today are returned.
  100. livestats <port>
  101. starts listening for livestats connections on port <port>.
  102. If <port> is "off" or "0", the bot will stop listening.
  103. resetuser <user> <channel>
  104. sets all statistics of user in channel to 0
  105. resetslang
  106. removes every language from the memory, so you can cleanly load a new
  107. set of languages.
  108. loadstatslang [lang] <langfile>
  109. loads a language
  110. loadstatsskin <skin-file>
  111. loads a skin for livestats
  112. setchanslang <channel> <language>
  113. sets the language in <channel> to <language>
  114. nick2suser <nick> <channel>
  115. returns the username of <nick> in <chan>
  116. activeusers [chan]
  117. returns all users that have a word-count over 0
  118. suserlist
  119. returns a list of all users in stats.mod database
  120. schattr user [+/-list] [+/-addhosts] ...
  121. changes attributes of a user
  122. Livestats:
  123. ----------
  124. If you activate livestats, your bot will listen on a specified port for
  125. http connections. (accessable via http://your.shell.com:8033/, for example
  126. (depending on your configuration, you might have to use your vhost instead))
  127. The webfiles will then be generated on the fly. There will also be a little
  128. channel and user list which makes it easier for your users to browse through
  129. the several channel statistics of your bot.
  130. Users can also enter a private configuration-area on this website where they
  131. can enter some information (eMail-address, homepage, icq-number, etc) and
  132. change some options.
  133. Use .console +1 to see access, or use the setting stats-loglevel to
  134. change the loglevel.
  135. Stats.mod is now also able to log the access to a CLF logfile, so you can
  136. use your favourite loganalyzer to generate stats of the stats access. :)
  137. Hint: If you don't want a channel to be listed on the index,
  138. ---- just set it +secret.
  139. User management:
  140. ----------------
  141. Since v1.3.0, stats.mod has an internal userdatabase. It can automatically
  142. add users and hostmasks to it. Users which are in the eggdrop userfile have a
  143. higher priority, so if someone is known as "bla" by the bot and as "blub"
  144. by stats.mod, his stats will be logged to "bla".
  145. Hostmasks will be removed from a user if they haven't been used for a
  146. specified time. If all hosts got removed from a user, the user will be erased
  147. completely.
  148. Note that stats.mod can't know when someone used IDENT or if someone added
  149. new hosts to a user manually. The affected user should cycle the chan to make
  150. sure that he's recognized correctly by stats.mod.
  151. There are three flags for users: +/-list, +/-addhosts and +/-nostats:
  152. - If a user has the flag -list, he/she/it won't be listed in the top10. (you
  153. probably want to set all your bot -list)
  154. - If a user is -addhosts, no new hostmasks will be added to him/her. You'll
  155. have to add all hosts manually with .+shost. (useful if someone if trying
  156. to fake you)
  157. - Hat ein Benutzer +nostats gesetzt, dann werden seine Statistiken nirgendwo
  158. angezeigt.(manche Leute legen diesbezüglich vielleicht Wert auf Privatsphäre)
  159. Channel settings:
  160. -----------------
  161. If you're using eggdrop 1.5 or later, you have some additional config options
  162. available via .chanset:
  163. +nopubstats
  164. Disables all channel commands (!top10 etc...)
  165. +quietstats
  166. Bot will reply with a notice directly to the user instead of
  167. sending the reply to the channel
  168. +nostats
  169. Don't log any stats in this chan at all.
  170. Other:
  171. ------
  172. There is absolutely NO WARRANTY on this module. I do my best to make it
  173. work properly, but if anything gets screwed up, I'm not responsible. Use
  174. this module at your own risk.
  175. Homepage:
  176. ---------
  177. The latest version of stats.mod(and a few addons) can always be found at
  178. http://www.visions-of-fantasy.de/stats.mod/
  179. Thanks to:
  180. ----------
  181. - Fabian for teaching me plenty of things
  182. - Johoho, Fox_Muld and many others for various bug reports and suggestions
  183. - dw for the idea of livestats and for many bug reports
  184. - the eggdev team for developing eggdrop