View Single Post
Old 10-13-2003, 07:24 PM  
Join Date: Jul 2003
Posts: 83

i suppose that this script can be useful for someone.

it's a killidlers.tcl script for bots, u can use with ioBanana o dZSBot.

# A simple public killidlers.tcl by Jog
# works on ioFTPDSiteKill 2.0.4

bind pub -|- !SITENAMEkill pub_killidlers

proc pub_killidlers {nick uhost hand chan args} {
   set lcl_sitename "-SITENAME- \[KILL-IDLERS\] "

   if {[isop $nick $chan]} {
      putserv "PRIVMSG $chan :$lcl_sitename Kikking all idlers ..."
      set reply [exec -keepnewline -- "c:\\ioFTPD\\scripts\\SiteKill.exe" "user!=sitebot" "idletime>3" "service=FTP_Service"]
      set output "..."
      set msg [split $reply "\n"]
      foreach line $msg {
         putserv "PRIVMSG $nick :$lcl_sitename $line"
         if { [string first "Totally 0" $line ] > -1 } {
            putserv "PRIVMSG $chan :$lcl_sitename No idlers at the moment."
         } elseif { [string first "Totally" $line ] > -1 } {
            set pos [expr int([string first " connections" $line]-1)]
            set num_kiked [string range $line 8 $pos]
            putserv "PRIVMSG $chan :$lcl_sitename Kikked $num_kiked idlers."
   } else {
      putserv "PRIVMSG $chan :$lcl_sitename Only OPs can kill idlers."

putlog "ioFTPDSiteKill 2.0.4 -Jog TCL- loaded"
this script catches the output of SiteKill and announce in the chan that is kikkink idlers and the number of users kiked, using private message sai the detailed kills to person who launched the command!

anyway u had to personalize the exec call and the sitename !!!
Jog is offline   Reply With Quote