how do i make a script that will allow me to type !invite bot #chan and it will send the eggdrop to that channel? but i only want it to work for me. i have been able to do this in mIRC but nothing like this in tcl
cheers
Code: Select all
bind pub m "!invite" pub:invite
proc pub:invite {nick uhost hand chan args} {
channel add $args
}
bind pub m "!leave" pub:leave
proc pub:leave {nick uhost hand chan args} {
channel remove $args
}
Code: Select all
### Public command channel join/part script ###
bind pub n !join pub:+chan
bind pub n !part pub:-chan
bind pub n .+chan 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 add $text
save
putserv "NOTICE $nick :I have added $args to my channel list."
return 0
}
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
}
Code: Select all
bind pub m "!invite" pub:invite
proc pub:invite {nick uhost hand chan args} {
channel add $args
}
bind pub m "!leave" pub:leave
proc pub:leave {nick uhost hand chan args} {
channel remove $args
}