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.

Auto voice

Old posts that have not been replied to for several years.
Locked
T
Trunks

Auto voice

Post by Trunks »

Somone know of an autovoice script that voice ppl after about half an houre ore something like that ?
N
Nimo
Voice
Posts: 11
Joined: Sun May 04, 2003 8:29 am

Post by Nimo »

Code: Select all

bind join - * auto_voice

proc auto_voice {nick uhost hand channel } {
  if {![matchattr $hand q|q $channel]} {
     utimer [expr 1700 + [rand 200]] if {((![isvoice $nick $channel]) && ([ison $nick $channel]) && (![matchattr $hand q|q $channel]))} {pushmode $channel +v $nick}                           
   }  
}      

I haven't tried the code but it should work.
//Nimo
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

utimer [expr 1700 + [rand 200]] if {((![isvoice $nick $channel]) && ([ison $nick $channel]) && (![matchattr $hand q|q $channel]))} {pushmode $channel +v $nick}
this would return an error like:
Tcl error: wrong # args: should be "utimer seconds command"
better calling another proc in timer

Code: Select all

utimer [expr 1700 + [rand 200]] [list voice:user $nick $channel $hand]
and put the voice code withing this proc

Code: Select all

proc voice:user {nick channel hand} {
if {((![isvoice $nick $channel]) && ([ison $nick $channel]) && (![matchattr $hand q|q $channel]))} {pushmode $channel +v $nick}
}
Locked