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.

Autovoice

Old posts that have not been replied to for several years.
Locked
g
g0rg0

Autovoice

Post by g0rg0 »

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?
g
g0rg0

Post by g0rg0 »

anyone???
User avatar
darkmare
Voice
Posts: 12
Joined: Mon Apr 12, 2004 12:55 pm
Location: Beaverton, OR
Contact:

Post by darkmare »

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.
Image
Brendan K Callahan Undernet: MaryFinn & PixelCat on #Mary'sPlace | http://3whack.org/brendan/ Theft by Deception DnB music (Released under the CreativeCommons License)
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

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
XplaiN but think of me as stupid
z
zleppy
Voice
Posts: 13
Joined: Wed Apr 14, 2004 2:32 pm

Post by zleppy »

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?

-zleppy-
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

or do on join msg nickserv info $nick see for what it replys ..
XplaiN but think of me as stupid
z
zleppy
Voice
Posts: 13
Joined: Wed Apr 14, 2004 2:32 pm

Post by zleppy »

probably easier to do yes...
User avatar
K
Voice
Posts: 34
Joined: Wed Jan 28, 2004 7:31 pm
Location: Romania @sibiu
Contact:

code

Post by K »

Code: Select all

## 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"
here is the code[/code]
User avatar
caesar
Mint Rubber
Posts: 3777
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

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.
User avatar
TALES
Halfop
Posts: 59
Joined: Sun Nov 09, 2003 8:45 am
Location: Netherlands
Contact:

Post by TALES »

Code: Select all

# 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"
}
i think this is what you are looking for.
Locked