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.

voice script

Old posts that have not been replied to for several years.
Locked
A
AW

voice script

Post by AW »

Hi, i'll appreciate if someone can help me to fix these codes, its works ok, but few things i couldn't figure out

like its voice ops as well, i don't it to voice ops, codes are there to check it
also if anyone changes his/her nick, doesn't voice
if bot joins a channel, it voice it, but check is there in codes

bind join - * blah
proc blah {nick uhost hand chan} {
global botnick
utimer [expr [rand 25] + 1] "check_voice $nick $chan"
}
proc check_voice {nick chan} {
if $nick == $botnick {return 0}
if {[onchan $nick $chan] && ![isop $nick $chan] && ![isvoice $nick $chan]} {pushmode $chan +v $nick}
}

thanks
regards
AW
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all


bind join - * blah 
proc blah {nick uhost hand chan} {
  if {![validuser $nick]} {
    adduser $nick "*!$uhost"
    chattr $nick +X
  }
  utimer [expr [rand 25] + 1] "check_voice $nick $chan" 
} 
proc check_voice {nick chan} {
  global botnick 
  set hand [nick2hand $nick]
  if {$nick != $botnick} {
    if {[onchan $nick $chan] && ![isop $nick $chan] && ![isvoice $nick $chan] && ![matchattr $hand b]} {pushmode $chan +v $nick}
    if {[matchattr $hand X]} {deluser $hand}
  }
}

that should work.
Elen sila lúmenn' omentielvo
A
AW

Post by AW »

thanks, everything else is got fixed..
except when user join a channel and changes his/her nick, this part doesn't work...

thanks
regards
aw
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

bind pub - !whois extended_babelist

bind join - * blah 
proc blah {nick uhost hand chan} { 
  if {![validuser $nick]} { 
    adduser $nick "*!$uhost" 
    chattr $nick +X 
  } 
  set hand [nick2hand $nick]
  utimer [expr [rand 25] + 1] "check_voice $hand $chan" 
} 
proc check_voice {hand chan} { 
  global botnick 
  set nick [hand2nick $hand] 
  if {$nick != $botnick} { 
    if {[onchan $nick $chan] && ![isop $nick $chan] && ![isvoice $nick $chan] && ![matchattr $hand b]} {pushmode $chan +v $nick} 
    if {[matchattr $hand X]} {deluser $hand} 
  } 
} 
something like that then...
Elen sila lúmenn' omentielvo
Locked