This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

i'd like need-key to work witn my chanserv script

Old posts that have not been replied to for several years.
Locked
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

i'd like need-key to work witn my chanserv script

Post by CosmicD »

...so far I have,

Code: Select all

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 , ?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

K who?

Post by user »

what happens when you /msg K getkey #chan?
Have you ever read "The Manual"?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

aha,

so the invite is enough to let the bot back in ? the key routine isn't really needed ?
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

FAQ #34 covers this best, doesn't it?
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>
:mrgreen:
Locked