View previous topic :: View next topic |
Author |
Message |
Thunderdome Op

Joined: 15 Mar 2005 Posts: 187
|
Posted: Fri Oct 14, 2005 6:36 pm Post subject: IRC Online Status Indicator |
|
|
hello!
I dunno if you guys know www.onlinestatus.org
Well, the IRC status indicator is crap and won't work on most networks.
I want to do something similar...
So, when certain nick is online, an image is shown.
When it is offline, other image is shown.
Or something perhaps more meticulous, like when a user is online, it shows the nick currently in use by that user. When it's offline it shows "offline".
The ideia is to link from a webpage to a particular image the bot makes/selects/renames....
The second case must be in php right? Can it be done with javascript?
I think this sounds simple, but I have no ideia of how to do this in tcl.
Anyone?
thanks!  |
|
Back to top |
|
 |
Thunderdome Op

Joined: 15 Mar 2005 Posts: 187
|
Posted: Thu Oct 20, 2005 4:58 pm Post subject: |
|
|
anyone with any ideias? :\ |
|
Back to top |
|
 |
deadite66 Halfop
Joined: 30 May 2005 Posts: 74 Location: Great Yarmouth, UK
|
Posted: Fri Oct 21, 2005 1:38 am Post subject: |
|
|
is this the kind of thing you want http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1061
Write Channel Nicklist 2 File
Will write all the current users on your channel to a txt file. It keeps users status such as opped and voiced users. There is an example irc_stats.php file included that will list the users from the stored nicklist.txt file and will also count how many are online. |
|
Back to top |
|
 |
Thunderdome Op

Joined: 15 Mar 2005 Posts: 187
|
Posted: Fri Oct 21, 2005 5:22 am Post subject: |
|
|
Yes, I've seen that... but the problem is making a javascript to put just one of the nicknames in a part of the site as online or offline.
Like in that onlinestatus.org site...
Have an ideia how to do it? |
|
Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sat Oct 22, 2005 8:04 am Post subject: |
|
|
I dont see any javascript used on onlinestatus.org for displaying the status. its just a plain picture tunneled through a script, which could be php, but does not neccessary to be so. Can be almost any other scripting language or libary/plugin that suppports file reading and binary data output.
The script probably is build in this structure:
- reading the status request from the URL string
- checking the status against the database (which can also be a text file)
- opening a image file representing the users status and dump it to the user agent
I would not recommend JavaScript, since it would need to read the whole datebase. If you do this you should ensure the datebase wont exceed a limit, so the file trasnfer size doesnt go above a few kilobytes (if compression is active the actuall size might be bigger).
PS: even the official web status from ICQ works that way . the only diffrent is, that its not using a script but a compiled libary  _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
Back to top |
|
 |
Thunderdome Op

Joined: 15 Mar 2005 Posts: 187
|
Posted: Sat Oct 22, 2005 10:39 am Post subject: |
|
|
I said javascript because I don't use php in the page where I want the online status.
The ideia is to get just the online status from 1 single nick from one channel whcih at most gets 10 people.
I can use that script to create a filelist of all #channel users, but I dunno how to use javascript to reads the file and select a user, and then make it so an image or something is added if the user is found. In javascript this is way over what I can do.
So I was wondering if there is a way to do this in tcl. The bot sees a nick and then published some .js file that contains info to show up some picture, or another to show another pictrue in case that nick is not there. get my ideia? |
|
Back to top |
|
 |
|