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.

Needed help for a tcl script

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

Needed help for a tcl script

Post by Anthax »

I am looking for a tcl script that will voice file server ads and track the file servers so that if the file server is down , it will devoice the user. Anyone has any ideas where i can get it ? :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I don't think this is yet publicly available, though I would suspect many people use them.

It shouldn't be that hard to make one, though you would have to watch out for a few things.

First, you would have to work out how it operates. Fully automated, or with slight manual intervention.

Fully automatic is tricky, as you would need to define rules, as to how to pickup a fserve.

IE. Simple colour messages are no good, as any1 can make these up.

The slighly manual way, would be to create user-records, and manage there hostmasks with a new flag, EG +F (note the capital). Scripts can operate a lot easier this way, and user can be genuinly tracked.

Anyway, for the manual way, this is pretty simple. This script could apply for any channel, let alone fserve channels.

Code: Select all

bind join F|F * fserve:join
proc fserve:join {nick uh hand chan} {
  putserv "MODE $chan +v $nick"
}
bind time - * fserve:manage
proc fserve:manage {min hour day month year} {
  if {[string index $min 0] == "0"} { set min [string index $min 1] }
  if {[expr $min % 5]} { return }
  foreach chan [channels] {
    foreach user [chanlist $chan &F] {
      if {[getchanidle $user $chan] >= 15} {
        putserv "MODE $chan -v $user"
      }
    }
  }
}
A
Anthax

Post by Anthax »

I am a total idiot when it comes to scripting. *Laughs* . So Will ppslim tell me if i upload that and get it running ... my problem will be solved ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I don't know.

Your explanation was not 100% clear, thus I have coded somthing to the best of my ability.

The only real way you are going to kow, is if you try it.

Simply upload in a file called fserver.tcl to the scripts directory int he bots DIR.

Edit the config file, and place "source scripts/fserver.tcl" at the base of the file.

Rehash your bot.

Give all fserv bots the +F channel flag on the channels you are running fservers in, or global +F if you want this to happen in any channel.
A
Anthax

Post by Anthax »

ok .... i think the tcl should work something like this .
1) it recognises the file servers ads and voice them
2) at a 20 mins interval , it type !list in main to check if the voiced users still have their ads on.

the reason why i wanted it is because some people fake as servers to get the voice status in which they will be recognise as helping in the channel and get autobumped on queues from other servers .

PS : Thanks for all your help :):):)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Then the above script will help you.

Simply creating a script to do this auto-voiceing, when they present a fileserver ad, is not what you want, purly due to the fact, they can still fake there messages.

Using eggdrop's internal userlist, and a small script, will allow you to auto-voice them on join, and de-voice them under inactivity.

Simply add any fservers as a user to the bot, and grant them the +F global or channel flag (to allow global or channel specific operation).

Only users that match a record with +F will be effected by this.
Locked