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.

chanset check script

Old posts that have not been replied to for several years.
Locked
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

chanset check script

Post by username »

Hello.

I need script which check every X min the channel flags what i wrote.

For example:

Code: Select all

#flags to check
chanset #mychan +usecolors
this is important to wright so "#chan flag" because I need several chans with different flags.

Code: Select all

#check every X min
set chechtime=X
so it check on #mychan flag +usecolors every X min. If its turn off script turn this on.

Thank you. Hope you understand my eng.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

if {[timerexists check:flags]==""} {
 timer 5 check:flags
}

proc check:flags {} {
 foreach chan [channels] {
  if {![channel get $chan usecolors]} {
   channel set $chan +usercolors
  }
 }
 timer 5 check:flags
}
This will check for the flag on all channels every 5 minutes, if disabled it'll enable it.

PS: alltools.tcl should be loaded for the [timerexists] command to work.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

Thank you, but if I need on chan #1 + usecolors on #2 - usecilors.
Can this be set by this way?
#anychan1 +usecolors
#anychan2 -usecolors
#anychan3 -udef...

first of all I need this script to save and check udef flags, because after restart they disappears and I have to wrote it again.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Udefs don't usually get reset after rehash or restart unless you have some script that's doing so.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

but what should I do to prevent it?
first idea was to get a script what would be keep it.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

once defined by some script, udefs are saved in chanfile; they won't disappear unless your script(s) use [setudef] inconsistently (i.e. failing to re-define udefs each time)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

there is such patch what I cant setup, I think that this will be the analogous script.
little info about this patch you can read here
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

In this thread,
demond wrote:you can fix it yourself just as I did, by editing src/mod/channels.mod/tclchan.c and substituting all occurances of the number 2048 with 4096, also 2047 with 4095 (these are in one function only, tcl_channel_add()); don't forget to recompile, reinstall & restart the bot after you are done with that ;)
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

thank you.
Locked