- Home»
- Cod sursa: kickcounter.tcl
kickcounter.tcl
kickcounter.tcl
TCL Script that keep kick stats into a database and return the total of them. Command: !kickstats
| Postat de | Copyright | Categorie | Review user | Vizualizari | Data |
|---|---|---|---|---|---|
| btc | Kanguru | stats | Cod netestat | 384 | 2023-12-25 09:48:18 |
# KICK-COUNTER
# http://www.kanguru.de
#
# (c) 2003 by Kanguru
#
# Anleitung:
# - einfach in den Scripts-Ordner kopieren
# - in den Bot einladen
# - vorher den Ordner stats im eggdrop-Ordner erstellen
# - Bot rehashen
#
# öffentliche Kommandos:
# !kickstats - gibt die Top Chatteranzahl aus, incl Datum
#
bind kick - * set-kick
bind pub - !kickstats print-kick
#
# SET-KICK Proc
#
proc set-kick {nick host hand chan target reason} {
set kick [expr [kick-laden $chan] +1]
kick-speichern $chan $kick
}
#
# PRINT-KICK Proc
#
proc print-kick {nick host hand chan rest} {
set kick [kick-laden $chan]
putchan $chan "$chan hat $kick kicks"
}
#
# LADEN Proc
#
proc kick-laden {chan} {
set chan [string tolower $chan]
set fd [open "stats/kick.$chan" "RDONLY CREAT"]
set kicks [gets $fd]
close $fd
if {$kicks == ""} { set $kicks 0 }
return $kicks
}
#
# SPEICHERN Proc
#
proc kick-speichern {chan kick} {
set chan [string tolower $chan]
set fd [open "stats/kick.$chan" "WRONLY CREAT"]
puts $fd $kick
close $fd
}
putlog "KICK-COUNTER by Kanguru geladen...."
IRC Snippets