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.

Making EggDrop save the channel visitors in a file

Old posts that have not been replied to for several years.
Locked
R
ReemE
Voice
Posts: 2
Joined: Mon Jan 03, 2005 10:03 am

Making EggDrop save the channel visitors in a file

Post by ReemE »

Hi guys,

I wanna add this tricky feature to my Eggdrop, but unfortunately, I'm not very into TCL programming. Thats why I could use a little help.. Thanks in advance!

Here the thing:

I want my Eggdrop to save alle channel visitors, that are in a specific channel right now, in a specific file every 30 secs.

Do you have any clue how to do that??

Thanks again,

greez
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you are on the wrong forum, and your request is kind of pointless, since the file will get overwritten every time save is done (or ridiculously big if appending data), but anyway, here's a Tcl script that does that (every minute):

Code: Select all

bind time - * foo
proc foo {m h d mo y} {
  if [botonchan #chan] {
    set f [open visitors.txt w]
    foreach v [chanlist #chan] {
      puts $f $v![getchanhost $v #chan]
    }
    close $f
  }
}
R
ReemE
Voice
Posts: 2
Joined: Mon Jan 03, 2005 10:03 am

Post by ReemE »

sorry bout posting it into the wrong forum and thanks for helping me anyways..

It makes sense that the file is overwritten every minute, because a PHP content grabber grabs the data and uses them to update a website with a list of all the users that are in the channel.


another question:
Where do I have to place it whithin the eggdrop script? anywhere ?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

in your bot's config file (or in a separate file which you load from the config using source command)
Locked