Old 12-10-2004, 09:42 AM   #1
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default irc command

proc iRCDELUSER {nick uhost hand chan args} { if {[ioB:istrusted $uhost] } {
global ioBvar
set userdel [string trim [lindex [lindex $args 0] 0]]
::ftp::Quote $ioBvar(ftp) SITE deluser $userdel
}
}


I would like to be able deluser starting from IRC but only on the chan admin... I do not manage to find the code.

Thanks
restesouple is offline   Reply With Quote
Old 12-10-2004, 11:37 AM   #2
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Code:

proc iRCDELUSER {nick uhost hand chan args} { 

  global ioBvar

  if { ($chan == "#yourchanname") && ([ioB:istrusted $uhost]) } {
    
    catch { set ee [::ftp::Quote $ioBvar(ftp) SITE DELUSER [lindex $args 0]] } result
    
    set lines [split $ee "\n"]
    
    foreach line $lines { 
      putquick "PRIVMSG $chan :$line"
    }
    
  }
  
  return
  
}
jeza is offline   Reply With Quote
Old 12-10-2004, 12:24 PM   #3
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default

nice

Thanks

But message is "200 kick Command successful." with others commands... I would like to leave "200" or "500" etc


Thanks
restesouple is offline   Reply With Quote
Old 12-10-2004, 01:57 PM   #4
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default

In reality I would like to view the responses FTP... Exemple:

<Me> !site kick USER
<BOT> kick Command successful.


Actually, i've that:

<Me> !site kick USER
<BOT> 200 kick Command successful.

<Me> !site gadduser iND TEST TEST *@*
<BOT> 0


restesouple is offline   Reply With Quote
Old 12-13-2004, 05:13 AM   #5
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default

nobody ?
restesouple is offline   Reply With Quote
Old 12-13-2004, 09:30 AM   #6
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

try

Code:
putquick "PRIVMSG $chan :[lrange [split $line] 2 end]"
jeza is offline   Reply With Quote
Old 12-13-2004, 09:39 AM   #7
jeza
Senior Member
ioFTPD Scripter
 
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
Old 12-13-2004, 10:40 AM   #8
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default

I request the full response of FTP...

(16:37:46) (+ME) !site kick test
(16:37:47) (BOT) User does not exist.

it's good, but

(16:38:17) (+ME) !site change TEST ratio 0
(16:38:18) (BOT) modified.
(16:38:18) (BOT) Command successful.

its an another response on FTP client



I use all command FTP in my channel admin...
restesouple is offline   Reply With Quote
Old 12-13-2004, 06:15 PM   #9
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

hehe

only way to see normal response on all commands is to have
putquick "PRIVMSG $chan :$line"

and u have to leave with 200- 500- ...
jeza is offline   Reply With Quote
Old 12-13-2004, 07:22 PM   #10
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default

Yes but with my skin 200- and 500- isn't beautiful

I don't know to leave 500 and 200 message
restesouple is offline   Reply With Quote
Old 12-14-2004, 02:45 AM   #11
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Code:
      foreach line $lines { 
      
        if { ([lindex [split $line] 0] == "200") || ([lindex [split $line] 0] == "500") || ([lindex [split $line] 0] == "200-") } {
          putquick "PRIVMSG $chan :[lrange [split $line] 1 end]"
        } else {
          putquick "PRIVMSG $chan :$line"
        }
      
      }
jeza is offline   Reply With Quote
Old 12-14-2004, 06:04 AM   #12
restesouple
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2004
Posts: 24
Default

Thanks :banana:
restesouple is offline   Reply With Quote
Reply

Tags
$userdel, chan, deluser, irc, [lindex

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:29 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)