set regnick "botnickwithchanserv"
set password "botpasswithchanserv"
set init-server {putserv "PRIVMSG K :LOGIN $regnick $password"}
#---- keep ops section ------
bind mode - "* -o" check:mode
proc check:mode {n ho ha ch mc who} {
if {[string equal -nocase $::botnick $who]} { putserv "PRIVMSG K :op $ch" }
}
bind need - "% op" foo
proc foo {c t} {putserv "privmsg K :op $c"}
bind need - "% invite" blah
proc blah {c t} {putserv "privmsg K :invite $c"}
bind need - "% key" pom
proc pom {c t} {putserv "privmsg K :getkey $c"}
I guess the last one isn't correct, because isn't there any need for an extra routine that tells the bot that the gotten key is actually that what it is , ?
Why don't you just ask for an invite from K?
getkey will make K give you the key i assume but that won't let you join. You'd have to make another bind for that to read the key
slennox wrote:The simplest way to do this is to set the channel's key in the enforced modes by using the chanset command, e.g. .chanset #channel chanmode +nstk <key>