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.

Bot should reop - Help with this script

Help for those learning Tcl or writing their own scripts.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I have edited the code, try it now.
d
darton
Op
Posts: 155
Joined: Sat Jan 21, 2006 11:03 am

Post by darton »

You are a god Sir_Fz. But you forgot a bracket.
set cmd [string trimleft [join [lrange [split $nho] 1 end-1]] \"]
I added it. Now it works perfectly.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Glad it worked. Also, something like this should work:

Code: Select all

# check every how many seconds?
set nhotime 30

if {[timerexists needhop]==""} {
 utimer $nhotime needhop
}

setudef str need-halfop

proc needhop {} {
 global botnick
 foreach chan [channels] {
  if {![botishalfop $chan] && [set nho [channel get $chan need-halfop]] != ""} {
   eval $nho
  }
 }
 utimer $::nhotime needhop
}
d
darton
Op
Posts: 155
Joined: Sat Jan 21, 2006 11:03 am

Post by darton »

Yes you are right.
Post Reply