# severstats.tcl v1.2 by domsen (c)2oo3 # # comments? bugs? ideas? plz mail me :) # # replys some infos about the server the eggdrop is running # on, but only if the need programs are installed and the # user's got the rights to execute them :) # # statschans - the channels the tcl is active in, "" for all # ####### config ###################### set statschans "" set statstrigger ".serverstats" ####### ende der config ############# bind pub - $statstrigger pubstats bind msg - $statstrigger msgstats proc pubstats {nick uhost handle chan arg} { global statschans if {([lsearch -exact [string tolower $statschans] [string tolower $chan]] != -1) || ($statschans == "")} { if {[catch {exec hostname} hostname]} {} if {[catch {exec uptime} uptime]} {} if {[catch {exec users} users]} {} if {[catch {exec uname -m} machine]} {} if {[catch {exec uname -n} nodename]} {} if {[catch {exec uname -sr} os]} {} putserv "privmsg $chan :uptime for $hostname : $uptime" putserv "privmsg $chan :machine: $machine, nodename: $nodename, os: $os" putserv "privmsg $chan :users logged in: $users" }} proc msgstats {nick uhost handle arg} { if {[catch {exec hostname} hostname]} {} if {[catch {exec uptime} uptime]} {} if {[catch {exec users} users]} {} if {[catch {exec uname -m} machine]} {} if {[catch {exec uname -n} nodename]} {} if {[catch {exec uname -sr} os]} {} putserv "notice $nick :uptime for $hostname : $uptime" putserv "notice $nick :machine: $machine, nodename: $nodename, os: $os" putserv "notice $nick :users logged in: $users" } putlog "*** serverstats.tcl v1.1 by domsen succesfully loaded" # [EOF]