egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

chanset check script

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Thu Oct 06, 2005 12:42 pm    Post subject: chanset check script Reply with quote

Hello.

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

For example:

Code:
#flags to check
chanset #mychan +usecolors

this is important to wright so "#chan flag" because I need several chans with different flags.
Code:
#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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Oct 06, 2005 3:28 pm    Post subject: Reply with quote

Code:
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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Thu Oct 06, 2005 10:08 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Oct 08, 2005 9:18 am    Post subject: Reply with quote

Udefs don't usually get reset after rehash or restart unless you have some script that's doing so.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Sat Oct 08, 2005 10:52 am    Post subject: Reply with quote

but what should I do to prevent it?
first idea was to get a script what would be keep it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sat Oct 08, 2005 11:17 am    Post subject: Reply with quote

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] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Sat Oct 08, 2005 1:34 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Oct 08, 2005 10:56 pm    Post subject: Reply with quote

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 Wink

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Sun Oct 09, 2005 1:32 am    Post subject: Reply with quote

thank you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber