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