mIRC Homepage
Posted By: Gar Is there a way of doing this? - 18/10/03 09:05 PM
Does anybody know perhaps of a script, which can read and display the amount of people, which are currently in an IRC room, and place that number on a website.

Is this possible?
Posted By: pleur Re: Is there a way of doing this? - 18/10/03 09:10 PM
yeah sure, but you should write an upload-script to update the site, and I think's that's difficult

you should better open a socket (to listening), and use that instead of the page

example: [url removed by PleuR]
Posted By: Gar Re: Is there a way of doing this? - 18/10/03 09:15 PM
all I am looking for is a script that says something like:

There is 3 members on the #Santharia channel

What you should me is a little too much.

Posted By: Gar Re: Is there a way of doing this? - 18/10/03 09:15 PM
or just

There is 3 members on the channel
Posted By: pleur Re: Is there a way of doing this? - 18/10/03 09:19 PM
i'm sorry, I mis understood you


//echo There are $nick(#channel,0) ppl on the channel
//echo There are $nick(#channel,0,o) ops on the channel
//echo The first voice on the channel is $nick(#channel,1,v)
see /help $nick for more info
Posted By: Gar Re: Is there a way of doing this? - 18/10/03 09:21 PM
but I need to have that text shown on a website.

I think I confused you....sorry
Posted By: pleur Re: Is there a way of doing this? - 18/10/03 09:23 PM
Hehe, i see


To do that, you have to edit the page, this must be done with Sockets, and requiers some scripting skills...
But if you think you can do it, and you can access your site with FTP, you have to learn sockets and the FTP protocol to edit the page
Posted By: Gar Re: Is there a way of doing this? - 18/10/03 09:25 PM
Is there a place I could learn about this stuff?
Posted By: Aazn Re: Is there a way of doing this? - 18/10/03 09:27 PM
You dont seem to understand. His question is

Quote:

Does anybody know perhaps of a script, which can read and display the amount of people, which are currently in an IRC room, and place that number on a website.


Notice that he wants to post it to a WEBPAGE, not on mIRC.

He probably wants a perl script that opens a mirc socket, listens, counts the users, and disconnects. I personally cant script in perl, and I dont want to learn so I suggest that you find some perl documents. Here, I'll give you a headstart in the Research:

Perl CGI

Perl Bots

Perl stats generator

How to connect to IRC through Perl

Simple Perl Bot

There. I've done some of the legwork for you, you need to read them. I think that going to perl is the best way possible at the moment, unless your better at VB/C++.

- Aazn
Posted By: Gar Re: Is there a way of doing this? - 18/10/03 09:29 PM
I might not of been as clear as I coulda been. Just got off work and its late here

Thanks though. I will read up on the info.
Posted By: Online Re: Is there a way of doing this? - 18/10/03 09:54 PM
You don't have to mess up with sockets for that, there's a clean way of uploading your file through FTP to your webpage. See this tutorial for details laugh
Posted By: Gar Re: Is there a way of doing this? - 19/10/03 08:02 AM
okay well I got some rest and think I am going to try this again.

What I am looking for is this:

I have a website, this website has its own channel. What I would like is some kinda Javascript or something, that will create the following text:

There is currently [color:blue]3 people on the channel.[/color]

This line of text will be found on a website, not on IRC. It will update itself when ever someone joins the room or leaves. Thus the blue number may increase to 4 when a person joins, or reduce to 2 when a person leaves.

I don't need it to be a live script, constantly changing. Just need it to look into the channel when the page is loaded, get the number of people in the channel, then report it. Doing this each time the page is reloaded.

* Gar wonders if he made himself any clearer.
Posted By: Online Re: Is there a way of doing this? - 19/10/03 11:46 AM
I understand what you are trying to do, and I think the best way would be running a timer that will periodically (every 5-15 mins) write the current usercount along with some HTML stuff into a file, and upload it to the website.

If you wanted to update the usercount whenever someone is viewing your page that would involve a lot of server-side programming (even running a separate clone for that, like the Online /whois service does) as well as delay that will likely annoy the visitors, and I honestly don't think it's not worth it.
Posted By: Tsunami Re: Is there a way of doing this? - 19/10/03 03:40 PM
I think he doesn't want to run a script for mIRC to do it, but something like he said, a JavaScript thingy that will look for the usercount...
Posted By: Aazn Re: Is there a way of doing this? - 19/10/03 04:11 PM
I dont think he wants mirc to do it, I think he wants PERL or JavaScript to look at the channel and say 'We have XX users in #EEE'. It would be easy doing it from mIRC, but what if his computer crashes.

He wants it to update on the website, so that he doesn't have to look at the sockets opening. It would be hard, but you can do it through perl. I know that. Perl is used for alot of chats, but PHP might work also.

I'd reccomend looking into PHP also.

- Aazn
Posted By: Online Re: Is there a way of doing this? - 19/10/03 06:08 PM
I can't help much then crazy

It would help if somebody already published such a PHP/Perl bot with some documentation.
Posted By: Gar Re: Is there a way of doing this? - 19/10/03 11:13 PM
yep, you get it now...but sadly can't help me frown
Posted By: KingTomato Re: Is there a way of doing this? - 20/10/03 05:09 AM
Unless you write a script (php, perl, etc) that connects to the server, joins ur channel, does a names lisitng and counts the users, and disconnected every time auser visits the page--its wont happen. The only other alternative is you, yourself, run a timer that sends a query to a page updating user count. Such as php could do:

www.somepage.com/users.php?count=<number>

And use sockets to connect and update the webpage via users.php
Posted By: archfiend Re: Is there a way of doing this? - 26/10/03 03:02 AM
As long as your channel is being indexed by SearchIRC, there is a built in feature from SearchIRC that allows you to do exactly that.

Please look at request channel stats
© mIRC Discussion Forums