Code: Select all
### Public command channel join/part script ###
bind pub n !part pub:-chan
bind pub n .-chan pub:-chan
proc pub:-chan {nick uhost hand chan text} {
set args [split [cleanarg $text]]
if {[llength $text]<1} {
putserv "NOTICE $nick :Usage: .-chan <#channel>"
return 0
}
channel remove $text
save
putserv "NOTICE $nick :I have removed $text from my channel list."
return 0
}
proc cleanarg {arg} {
set response ""
for {set i 0} {$i < [string length $arg]} {incr i} {
set char [string index $arg $i]
if {($char != "\12") && ($char != "\15")} {
append response $char
}
}
return $response
}
hi
Possible add arg for raison?
Expl: !part #chan Bla Bla Bla
<bot> Chan has been deleted by $nickname for raison: Bla Bla Bla
<bot> leave chan.
Thx for all help.
Code: Select all
### Public command channel join/part script ###
bind pub n !part pub:-chan
bind pub n .-chan pub:-chan
proc pub:-chan {nick uhost hand chan text} {
set args [split [cleanarg $text]]
if {[llength $text]<1} {
putserv "NOTICE $nick :Usage: .-chan <#channel> <raison>"
return 0
}
putserv "PRIVMSG $test :Chan has been deleted By $nick .Raison: [u]???$arg???[/u]
channel remove $text
save
putserv "NOTICE $nick :I have removed $text from my channel list."
return 0
}
proc cleanarg {arg} {
set response ""
for {set i 0} {$i < [string length $arg]} {incr i} {
set char [string index $arg $i]
if {($char != "\12") && ($char != "\15")} {
append response $char
}
}
return $response
}