Can anyone tell me the tcl code,
if a user joins a channel the bot checks if his nick is registred on nickserv,
if it is registered the bot will voice him if not, it won't.
can you help me?
I know this isn't quite the answer you're looking for, but why not just set the defaults for a new user on the bot to "g", which autovoices them.
Brendan K Callahan Undernet: MaryFinn & PixelCat on #Mary'sPlace | http://3whack.org/brendan/ Theft by Deception DnB music (Released under the CreativeCommons License)
euhm i don't think it is possible cause i can't find a way to get the users modes check with ur services i am sur they got something like that .. if they don't and u are able to get the users modes then check for mode r or something depends of course .. some services use an other flag but most services ive seen so fare use mode r check for that if ur able to then if the user has +r voice it
hmmm...
maybe do a bind join on ur channel, and then make the bot whois the user and search the reply for "is a registered and identified user" of whaterver ur nickserv replies?
and then do some if's and elses?
## autovoice.tcl
## - voices everyone in a channel when they join
# What channels should this work on?
# - note, "" is for all channels
set avchan ""
## Begin the code
bind join - * avjoin
proc avjoin {nick uhost hand chan} {
global avchan botnick
if {$nick == $botnick} {return 0}
if {$avchan == "" && [botisop $chan]} {
pushmode $chan +v $nick
return 0
}
set chan [string tolower $chan]
foreach i [string tolower $avchan] {
if {$i == $chan && [botisop $chan]} {
pushmode $chan +v $nick
return 0
}
}
}
putlog "Loaded autvoice.tcl by kurupt"
setudef flag avoice
bind join - * my:voice
proc my:voice {nick uhost hand chan} {
if {[isbotnick $nick] || ![channel get $chan avoice] || ![botisop $chan]} {
return
}
pushmode $chan +v $nick
}
From party line do ".chanset #channel +avoice" on the channel or channels you want this to be activated and ".chanset #channel -avoice" in channel or channels you want to be disabled.
Once the game is over, the king and the pawn go back in the same box.
# onjoin whois nick and if the raw 307 is reply
# registered nick -> voice nick
# the raw will only be shown when nick has identifyed.
set scan(nick) "#yourchannel"
bind join - "$scan(nick) *" tls:join
bind raw - 307 tls:ident
proc tls:join {nick host hand chan} {
global tls_nick
set tls_nick $nick
putserv "WHOIS $nick"
utimer 3 tls:not:ident
}
proc tls:ident {from key args} {
global tls_nick
set args [join $args]
set tls_nick [string tolower [lindex $args 1]]
set regist [strlwr [lindex [lrange [split $args ":"] 1 end] 0]]
#if raw 307 is a registered nick voice the chatter.
if {$regist == "is a registered nick"} {
foreach j [utimers] {
if {[lindex $j 1] == "tls:not:ident"} { killutimer [lindex $j 2] }
}
putserv "PRIVMSG #yourchannel :$tls_nick is: Registered and will be voiced."
pushmode #yourchannel +v $tls_nick
}
return 0
}
proc tls:not:ident {} {
global tls_nick
putserv "PRIVMSG #yourchannel :$tls_nick is: NOT Registered first registered your nick and identify"
putserv "PRIVMSG #yourchannel :Type: /msg nickserv help REGISTER"
}