florian-sander / stats.mod

stats.mod is a module which equips your eggdrop with the ability to create various statistics about your channels.
http://www.kreativrauschen.com/stats.mod/
9 stars 5 forks source link

Adding host to users #5

Open Pikachutwo opened 8 years ago

Pikachutwo commented 8 years ago

Is it possible to remove the adding host part from the stats.mod? That will be very good as if we change nick it still counts to the old nick.. that way, it will add a new nick to the database.. if you know what i mean.. Obs: i ask this change to v1.3 of stats.mod

florian-sander commented 8 years ago

I'm not quite sure if I understand you correctly. You can disable the automatic addition of host masks to users by setting the option autoadd to 0 in stats.conf. That way only users known to the bot (or manually added) will be identified.

If you want to strictly track stats only by nickname then I am afraid this is currently not possible. It would be great if the host mask generation was configurable. That would be a new feature though.

Pikachutwo commented 8 years ago

and about creating a proc that emulates the adding users on every minute or on each join? is that possible? i mean, we can enable eggdrop user file and make some proc doing if {![validuser $nick]} {adduser $nick ${nick}!@} or something like that.. if you understand me..

florian-sander commented 8 years ago

That would be the way it is right now (except that the host is included). By default stats.mod will add users after 5 minutes, but this can be configured to just one minute.

Or do you mean something else?

Pikachutwo commented 8 years ago

lemme see if i can explain myself better.. i'm portuguese and sometimes have some difficulties to explain myself.. we can set the autoadd to 0, enable the using eggdrop userfile to 1, and create a proc to add the users if they are not there on each minute.. do you understand now?

florian-sander commented 8 years ago

Ah, now I understand. Yes, that sounds like a great idea for a workaround in TCL.

I'm not sure if there is currently a way to add stats users via TCL though. You probably would not want to add a real bot user that easily.

There are DCC commands for adding stats users. Maybe you can access those through TCL. Unfortunately I do not remember enough of the interface between eggdrop and TCL anymore.

Pikachutwo commented 8 years ago

well, the stats.mod must use a specific command to add the users, right? maybe we can grab that and use it in a tcl. that's just an idea. i'm going to see what i can do, eventho i really dont understand much about tcl. :)

Pikachutwo commented 8 years ago

maybe something like this... bind time - * addstatsuser proc addstatsuser {nick host hand chan text} { if {![validuser $nick]} { adduser $nick $nick!@ } }

Pikachutwo commented 8 years ago

or near this

florian-sander commented 8 years ago

Looks good. It's been too long for me to know if this will work or not, though. :)

Please note that this way you will add users to eggdrops main user database, not only to stats.mod. I'm not sure if this is a good idea. Again, it's been too long since I have used eggdrop to know any details.

stats.mod itself does not use TCL commands to add users. stats.mod has a separate user database, independent of the eggdrop user database. It will recognize users from the eggdrop userbase as well though. So if you really add users to the main database, stats will be tracked for them.

Pikachutwo commented 8 years ago

well, i must find a way.. since i dont want the host part.. lol