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.

..is online/away/offline script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
J
Jii92-
Voice
Posts: 2
Joined: Sat Dec 09, 2006 6:00 am

..is online/away/offline script

Post by Jii92- »

Hi, im requesting script that can show someones status in irc on website.
I saw'd this, but im having a bnc so it doesn't help lot. ^^'

So it have to show that im online, and if im away it shows awaymsg that i left. And if bouncer is crashed it shows "offline".

(and don't answer "onlinestatus.org", i tried that but it doesn't work)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

I'll work on this, gimme a few days.

This is what I have in mind so far for options:

Code: Select all

# Channels where we allow use:
set iwschans "#mychan #chan2 #etc"

# domain for webpage:
set iwsdom "myweb.domain.com"

# path for putting the webpage on the remote site (this directory must exist before running this script.)
set iwspath "/home/myweb/some/path"

# login name:password for the remote website
set iwslogin "mylogin:password"

# path and filename for generating/storing webpage locally
set iwsfile "/home/mybot/data/iws.html"

# user's permission flag required for adding themselves to the webstats page
set iwsuserperm "f|f"

# admin permission for adding/deleting other users from the webstats page
set iwsadminperm "n|n"

# update interval - if set to 0, immediately update webpage whenever any user's status changes, otherwise set this
# to the number of minutes to wait between updating and uploading a new status page.
set iwsupdate 0
Any other ideas?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Ohh I should mention, I pretty much despise html so the actual html will be minimal. I'll put in a config option for a header, and will just use normal fonts/colors elsewhere. If anyone has ideas for adding html formatting or css sheets, that would be nice =)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'd probably do something similar to what bwbar does..
Just output an image/unformatted textfile, and let webpages include it using SSI-includes, php, cgi, perl, etc.

Does depend on such features being implemented on the web-server, but on the other hand makes it very flexible for the user to implement.

Maybe include a couple of examples on how to include it in a webpage with various methods?
NML_375
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Err, you lost me on that nml <grin>

This is the html template I'm planning to use:

Code: Select all

# html format:
# <html><head><title> $iwshead </head></title>
# <h1><center> $iwshead </center></h1>
# <br><p>
# <ul>
# <li> $line </li>
# <li> $line </li>
# </ul>
# <h6><center> Eggdrop IRC WebStatus TCL Script - Copyright C.Leonhardt 2006 </center></h6>
# </html>
The format for the $line's will be something like:
$nick ($handle - $uhost) - Status: $time away ($awaymsg)
$nick ($handle - $uhost) - Status: $time Online
$nick ($handle - $uhost) - Status: $time Offline ($quitmsg)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Hehe, I'll try to clarify :p

My suggestion would be to skip any and all html-coding/formatting, and just output some plain text saying "$nick!$uhost ($handle): Status - $status $msg", the suggesting users create their own html-file that includes your tiny textfile

The advantage of this solution is any and all formatting information is separated from your tcl:et, making it alittle easier for the user/webdesigner to adapt the appearance of the page. Downside would be that you'd have to use a webserver with SSI, php, cgi or such enabled..

SSI (serverside includes) example:
...
<html>
<head><title>irc-status</title></head>
<body>
<p>
<!--#include virtual="irc-status.txt" -->
</p>
</body>
</html>
NML_375
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Gotcha, I'll make that an option, to either produce plain text, or the rudimentary html file.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

rosc2112 wrote:Gotcha, I'll make that an option, to either produce plain text, or the rudimentary html file.
and for server-side notification, you might want to consider now already ubiquitous WATCH command, instead of ISON (and check for WATCH support via VERSION and 005 numeric reply)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Hmm I didn't even think of that.. I was going to just use the join/part/quit binds, and do a periodic whois to check away status (and also have an optional command to set 'away/back' manually in the script.)

# bind join
# bind part
# bind sign
# bind kick
# bind nick

There's already a config option for which channels to use the commands in, I can make the script monitor only those channels as well (or make it an optional list of channels to monitor.) So, basically, if you're not in one of those channels, you're marked "offline"

Would be helpful Jii92 would chime in here on what options they want :P
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

actually periodic WHOIS is not recommended as it's usually more severely rate-limited than ISON and a potential cause of the bot flooding itself out due to exceeded sendq; WATCH is preferable to both of these (needless to say, none will work if the user is +i and not on bot's channels)

naturally, if that guy wants channel monitoring only, the above is irrelevant
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
J
Jii92-
Voice
Posts: 2
Joined: Sat Dec 09, 2006 6:00 am

Post by Jii92- »

Im sorry of my bad english if someone understanded me wrong.
I just want that i can put my irc status to my blog which displays my status in irc. (not everyone in one channel, only me or somebody else, if somebody understanded me wrong)

It could check my online status every 2-10 minutes, and generate html file.

(sorry if somebody understanded me wrong :| )
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Ohh I was just looking for ideas for features to add to the script. The main part of the script is pretty simple, so I figured I'd beef it up some and give people more options. :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Just a bump to let you know I will be working on this script, but probably not til after the new year. I have a lot going on at the moment with the holidays.
Post Reply