Script for checking is user online in IRC

Discussion about the creation of websites in general, HTML, PHP, Java.

Script for checking is user online in IRC

Postby Pinkbyte on Thu Apr 27, 2006 2:58 pm

Well, I need such script, becose i want to view on my webpage online status of my eggdrop bot. What i need to write such script? Please not to send me to RFC standarts etc. Only really help, better on PHP...
Pinkbyte
Contributer
Contributer
 
Posts: 49
Joined: Sun Mar 19, 2006 7:44 am
Location: Russian

Postby xavice on Tue May 02, 2006 4:42 am

I don't think that's possible, because HTTP and IRC use two different protocols, so they wouldn't be able to communicate directly. Maybe a bot sitting like eggdrop or something would be able to determine that data.
xavice
Newbie
Newbie
 
Posts: 15
Joined: Tue May 02, 2006 4:35 am

Postby Lattyware on Tue May 02, 2006 4:47 pm

Well, I have seen PHP IRC bots, so in theory it should be possible, I don't actually know how though.
Lattyware
Contributer
Contributer
 
Posts: 23
Joined: Mon May 01, 2006 5:46 pm

Postby De Kus on Tue May 02, 2006 4:53 pm

are you running your eggdrop with livestats? If so, you could query your eggdrop for users on its channels.
else you could write a tcl script which waits for incomming connections of your web page to just reply the whois. I believe its unncessary traffic for an IRC network to login a session just to do a whois and quit Very Happy.

The login is quite simple, you need just 2 lines:
Code: Select all
nick <nick>
user <user> . . :<real name>

then you will need ro reply to a PING request from the server with PONG and the argument of the previous PING. Some servers might even enforce you replying to some extra stuff, often CTCP.
ex. for PING:
Code: Select all
request: PING :irc.server.net
reply: PONG :irc.server.net
Image
User avatar
De Kus
Phoenix Veteran
Phoenix Veteran
 
Posts: 305
Joined: Mon Mar 14, 2005 2:15 pm
Location: Germany

Postby dlx on Wed May 31, 2006 12:28 pm

egghelp.org should have some scripts to make your eggdrop report its own status to some webserver. you would only need to grab those stats and parse it into php then.. i guess that would be the easiest way
\o/
dlx
Contributer
Contributer
 
Posts: 37
Joined: Wed May 31, 2006 11:57 am
Location: .de

Postby TomH on Wed Jun 14, 2006 11:55 am

Hi did you get this workin corectly in the end ? Id be pretty intrested in it
TomH
Contributer
Contributer
 
Posts: 40
Joined: Tue Jun 13, 2006 8:32 pm

Postby jastarafie on Thu Jun 22, 2006 10:58 am

I guess you could do it with a little perl script or with a crontab entry that checks if your bot is online.
jastarafie
Newbie
Newbie
 
Posts: 17
Joined: Tue Jun 20, 2006 1:02 pm

Postby Soxide on Fri Jun 23, 2006 12:49 pm

well you can make a eggdrop upload trivia stats on a webpage it generates it in html and also you can do the same with Mirc. you just need to bot to save the channel list into a dir and every time some 1 parts or quits it changes the file. then get it to put it into html with some tcl scripts
::Soxide::
.:. The Power Of Dreams .:.
Soxide
Contributer
Contributer
 
Posts: 28
Joined: Fri Jun 23, 2006 12:37 pm
Location: Wrexham

the best thing

Postby doggfather on Tue Jul 25, 2006 1:37 am

the best thing for that is google
Very Happy
doggfather
Newbie
Newbie
 
Posts: 15
Joined: Tue Jul 25, 2006 1:14 am

Postby topolab on Tue Jul 25, 2006 4:41 pm

i have a script for egg which emails me(sms) when a nickname comes into my channel
Image -= irc.EFNET.nl : #AIVAnet , #salonica =-
Image -= 0day symbian+pda -> http://aivanet.info =-
topolab
Regular
Regular
 
Posts: 134
Joined: Sun Sep 11, 2005 7:31 am
Location: macedonia-north greece

Re: Script for checking is user online in IRC

Postby callihn on Fri Jul 28, 2006 10:07 am

Pinkbyte wrote:Well, I need such script, becose i want to view on my webpage online status of my eggdrop bot. What i need to write such script? Please not to send me to RFC standarts etc. Only really help, better on PHP...


The problem is that IRC is not setup to be queried without connection so the script would have to connect to the server or get information from a bot setting on the server and you could just as easily connect to the server yourself and get that information, unless they are set +i in which case the channel will have to be joined to see them.

So what are you trying to do exactly?

Do you want to be able to see if your bot goes down?
callihn
Regular
Regular
 
Posts: 77
Joined: Thu Jul 27, 2006 2:35 pm
Location: Cyberspace

Postby Starmax on Sat Aug 05, 2006 7:47 pm

If i am understanding the question correctly: you should be able to use "pisg" to udate a stats channel in .html , in which case it'll update how ever often you want it to.

If the page updates,you know your bot is online and if it doesnt update,either your bot is offline or the "pisg" isnt working.

I could be wrong but its an easy .tcl for your bot.. Smile
Starmax
Regular
Regular
 
Posts: 96
Joined: Wed Mar 08, 2006 6:19 am
Location: U.S.A.

Postby Cosplay on Sat Sep 02, 2006 6:07 pm

De Kus wrote:are you running your eggdrop with livestats? If so, you could query your eggdrop for users on its channels.
else you could write a tcl script which waits for incomming connections of your web page to just reply the whois. I believe its unncessary traffic for an IRC network to login a session just to do a whois and quit Very Happy.

The login is quite simple, you need just 2 lines:
Code: Select all
nick <nick>
user <user> . . :<real name>

then you will need ro reply to a PING request from the server with PONG and the argument of the previous PING. Some servers might even enforce you replying to some extra stuff, often CTCP.
ex. for PING:
Code: Select all
request: PING :irc.server.net
reply: PONG :irc.server.net



Great help and I hope you all get that to work b/c I can understand where you are both coming from. thanks for the reply
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.

A girl who might be cute, but you can't tell from the low-quality pictures
Cosplay
Newbie
Newbie
 
Posts: 15
Joined: Sat Sep 02, 2006 5:19 pm


Return to General Webmastering

Who is online

Users browsing this forum: No registered users and 1 guest

cron