View Full Version : irc command
restesouple
12-10-2004, 09:42 AM
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. :confused:
Thanks
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
}
restesouple
12-10-2004, 12:24 PM
nice
Thanks :)
But message is "200 kick Command successful." with others commands... I would like to leave "200" or "500" etc
Thanks
restesouple
12-10-2004, 01:57 PM
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
12-13-2004, 05:13 AM
nobody ? :confused:
try
putquick "PRIVMSG $chan :[lrange [split $line] 2 end]"
or this
#!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
}
restesouple
12-13-2004, 10:40 AM
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
:confused:
I use all command FTP in my channel admin... :)
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- ...
:D
restesouple
12-13-2004, 07:22 PM
Yes but with my skin 200- and 500- isn't beautiful :p
I don't know to leave 500 and 200 message :(
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"
}
}
restesouple
12-14-2004, 06:04 AM
Thanks :banana:
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.