Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######################################
- # THIS IS A WIP! ERRORS ARE EXPECTED #
- ######################################
- #################
- # StatsMod Hack #
- #################
- #
- # This script is a way to provide tracking stats by nickname, while that function isn't on the module itself.
- # I've done it to personal use, so don't expect it to be a super script! :D
- # It's advisable to edit it to fit your needs
- # In order to use this script you have to do a few changes on your stats.conf. They're the following:
- ## set autoadd 0
- ## set use-eggdrop-userfile 1
- ## set anti-autoadd-flags "mnofvb-|mnofvb-"
- ## set anti-stats-flag "b|b"
- # Enjoy!
- ### Configuration ###
- # How many minutes between each add user check?
- set checktime "5"
- # List of badnicks that shouldn't be added
- set badnicks {Guest* *Serv Achmed Lily}
- ### End of configuration ###
- ### Binds ###
- # Adding users to the userfile
- bind cron - "*/$checktime * * * *" addstats
- # Adding new nicks upon nick change to userfile
- bind nick - "*" addnew
- ### End of Binds ###
- ### Procedures ###
- # Proc off adding nicks
- proc addstats {minute hour day month weekday} {
- global badnicks botnick
- foreach chan [channels] {
- foreach user [chanlist $chan] {
- if {![validuser $user]} {
- set isnick 0
- if {[lsearch $badnicks $user] >= 0 || [string match -nocase $user $botnick]} {
- set isnick 1
- break
- }
- #foreach check $badnicks {
- # if {![string match -nocase "$check" $user]} {
- # continue
- # }
- # if {[string match -nocase "$check" $user] || [string match -nocase $user $botnick]} {
- # set isnick 1
- # break
- # }
- #}
- if {!$isnick} {
- adduser $user ${user}!*@*
- } else {
- return
- }
- }
- }
- }
- }
- # Proc off adding new nicks
- proc addnew {nick uhost hand chan newnick} {
- global badnicks botnick
- if {![validuser $newnick]} {
- set isnick 0
- foreach check $badnicks {
- if {![string match -nocase "$check" $newnick]} {
- continue
- }
- if {[string match -nocase "$check" $newnick] || [string match -nocase $newnick $botnick]} {
- set isnick 1
- break
- }
- }
- if {!$isnick} {
- adduser $newnick ${newnick}!*@*
- } else {
- return
- }
- }
- }
- ### End of procedures ###
- putlog "StatsMod Hack v0.3 loaded"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement