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.

Yo, a question

Old posts that have not been replied to for several years.
Locked
s
sonic_tsunami

Post by sonic_tsunami »

how would I gather random quotes and have them display on a webpage like how chatstats does?
http://xteam.no-ip.org/tsunami/ircstats/
is where my stats are stored.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

There are lots of ways. The two most obvious are:

1. Write a script that listens to channel chatter and saves the line if a random condition is met. For instance, if {[rand 100] == 1} {save_the_line} would save 1/100 of the lines (on average). You could have it rewrite the quote file each time, so that it gets rid of the first line, and appends a new one. Then you'd have a continuously changing set of random quotes. Output them in html format and you're done.


2. Create a logfile to log channel messages, and then write a script to randomly select lines from it and put them in the quote file. Then write another script to periodically write an html file based on the quote file.
Locked