mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
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?

Joined: Oct 2003
Posts: 30
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
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]

Last edited by pleur; 18/10/03 09:19 PM.

------
Cheers m8!
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
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.


Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
or just

There is 3 members on the channel

Joined: Oct 2003
Posts: 30
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
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


------
Cheers m8!
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
but I need to have that text shown on a website.

I think I confused you....sorry

Joined: Oct 2003
Posts: 30
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
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


------
Cheers m8!
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
Is there a place I could learn about this stuff?

Joined: Oct 2003
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Oct 2003
Posts: 8
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


( www.nnscript.de )
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
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.

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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

Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
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.

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Joined: Oct 2003
Posts: 50
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2003
Posts: 50
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...

Joined: Oct 2003
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Oct 2003
Posts: 8
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


( www.nnscript.de )
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
I can't help much then crazy

It would help if somebody already published such a PHP/Perl bot with some documentation.

Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
yep, you get it now...but sadly can't help me frown

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
Joined: Jul 2003
Posts: 6
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2003
Posts: 6
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

Last edited by archfiend; 26/10/03 03:05 AM.

Link Copied to Clipboard