Thread: irc command
View Single Post
Old 12-13-2004, 09:39 AM  
jeza
Senior Member
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

or this

Code:
#!ftp site deluser login
#!ftp site gadduser group login pass ip
#!ftp site kick login

bind pub -|- !ftp FTPCMD

proc FTPCMD {nick uhost hand chan args} { 

  global ioBvar

  if { ($chan == "#yourchanname") && ([ioB:istrusted $uhost]) } {
    
    if { [string tolower [lindex $args 0]] == "site" } {
      
      if { [string tolower [lindex $args 1]] == "deluser" } {
        
        catch { set ee [::ftp::Quote $ioBvar(ftp) SITE DELUSER [lindex $args 2]] } result
        
      }
      
      if { [string tolower [lindex $args 1]] == "gadduser" } {
        
        catch { set ee [::ftp::Quote $ioBvar(ftp) SITE GADDUSER [lindex $args 2] [lindex $args 3] [lindex $args 4] [lindex $args 5]] } result
        
      }
      
      if { [string tolower [lindex $args 1]] == "kick" } {
        
        catch { set ee [::ftp::Quote $ioBvar(ftp) SITE KICK [lindex $args 2]] } result
        
      }
      
      set lines [split $ee "\n"]
      
      foreach line $lines { 
      
        putquick "PRIVMSG $chan :[lrange [split $line] 1 end]"
      
      }
    }
    
  }
  
  return
  
}
jeza is offline   Reply With Quote