vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   IRCBrowse - no Eggdrop + no FTP!! (https://vborg.vbsupport.ru/showthread.php?t=48734)

feldon23 02-08-2003 10:00 PM

IRCBrowse - no Eggdrop + no FTP!!
 
I looked at the "IRCUsers" hack written by eyeball (aka supreemball) using the ftp mirc script coded by Rich@home.nl and I thought wow this is cool. Then I looked at what's involved.

*It modifies global.php, meaning that EVERY PAGE of your forum loads this information even though only index.php uses it.

*It adds 1,150 lines of code to your mIRC.

*Requires 24/7 FTP access


So I thought, why not have vBulletin AND mIRC interface with a PHP file?
Thank you eyeball and Rich for the inspiration to write this!

I don't have a photo/snapshot because the PHP script runs "silent" and how the output looks all depends on your vB template.

The PHP script provides the # of total chatters, the highest # of chatters ever, and a formatted (customizable in the PHP script) comma-delimited list of users in the chat which you can insert anywhere in your templates (an example template under forumhome is provided).

The mIRC script opens a socket to your web server (HTTP) and does an "HTTP GET" to request the ircbrowse.php script. The secret is, it puts all the data in the Query line after the URL and then just ignores the page it gets back from the web server and closes the socket. This is all password-protected.

This is my first hack posted here so please be gentle. :)

This hack is operating on:

SereneScreen Aquarium Forum
Anime System

FleaBag 02-09-2003 07:39 PM

Very nice work, impressive. Just what a lot of people have been looking for!

feldon23 02-09-2003 08:00 PM

If one were so inclined, the PHP script could also, using global.php and the authentication stuff (a bit over my head still) write the results directly into your MySQL database to be retrieved later by index.php.

I wonder which is faster, querying MySQL or querying a PHP script. :)

wooolF[RM] 02-09-2003 08:53 PM

I think MySQL

FleaBag 02-09-2003 10:01 PM

I think so too, hence the whole point of using databases and in particular MySQL.

feldon23 02-09-2003 10:10 PM

Anyone actually running this? :)

Velocd 02-09-2003 11:55 PM

I'm having slight difficulty getting this thing to update the .txt file.
I'm probably entering something wrong, knowing my luck.

In the "ALIASES" folder, for this section of code:
Code:

  ;## Change the following 3 settings:
  %ircbrowsechannel = #animesystem.com
  %ircbrowseserver = www.animesystem.com
  %ircbrowsestr = /forums/ircbrowse.php?key=1234&action=write
  ;##

Would that be correct? My "ircbrowse.php" is located in my forums directory.

feldon23 02-10-2003 12:03 AM

Ok my instructions are wrong, they say to CHMOD ircbrowse.txt to 644. It needs to be 666.

Your ircbrowse.php file is in the right place (I tested it). Make sure the key in your mIRC script matches the key in ircbrowse.php and make sure that you have CHMODded ircbrowse.txt to 666.

I have since updated the ZIP file without changing the version number since no code is affected.

S1R1US 02-10-2003 12:46 AM

looks very very nice. I have the similar hack at the bottom of my forums, pokecommunity.com but like yours better. Will it work with 2.2.9. Also how do it upload the list and keep it up to date without eggdrop or ftp mirc? Also i've been looking for a java chat to use on my forums and ur script will go perfectly with using it since it links the channel name with the java applet. Can u tell me info to get the chat applet ur using as well. THanks again!

Velocd 02-10-2003 12:48 AM

Quote:

Originally posted by feldon23
Ok my instructions are wrong, they say to CHMOD ircbrowse.txt to 644. It needs to be 666.

Your ircbrowse.php file is in the right place (I tested it). Make sure the key in your mIRC script matches the key in ircbrowse.php and make sure that you have CHMODded ircbrowse.txt to 666.

I have since updated the ZIP file without changing the version number since no code is affected.

Ah, I was wondering about why you mentioned it to be "644" in the original directions, when that is usually set by default.

It works perfectly now, great hack! ;)
(demo: http://www.animesystem.com/forums")

[high]* Velocd clicks install
[/high]

I had requested this in Eyeball's last hack, and that is is there a way to grab the topic from the channel in the chat, then I could display that variable?

S1R1US 02-10-2003 12:52 AM

btw will this display half-op status also? how bout voiced? i've seen one with hop before but not voiced

feldon23 02-10-2003 12:59 AM

Quote:

S1R1US said:
looks very very nice. I have the similar hack at the bottom of my forums, pokecommunity.com but like yours better.
Looks good there. Lots of chatters, wow!

Quote:

S1R1US said:
Will it work with 2.2.9.
I'm using it on 2.2.9.

Quote:

S1R1US said:
Also how do it upload the list and keep it up to date without eggdrop or ftp mirc?
That is the magic.

I looked at mIRC's ability to open any socket and then looked up the HTTP 1.0 spec to see what the bare minimum communication necessary for mIRC to invisibly "open a website" long enough for the PHP script to grab the information being passed to it. Turns out it didn't take much. I tell you. Khaled needs to scrap mIRC's scripting and put PHP. NOT having a space in one spot kept me hamstrung for 45 minutes. :(

Quote:

S1R1US said:
Also i've been looking for a java chat to use on my forums and ur script will go perfectly with using it since it links the channel name with the java applet. Can u tell me info to get the chat applet ur using as well.
I am using the freebie at webmaster.com. As a result, I am locked into their chat network. They just updated the Java and it is a bear now. Before, maybe it was feature-light, but it loaded fast and worked reliably. Now it's bloatware that loads 60% of the time. And all the new users who come into my chat butt into the fact that this chat network has like 20,000 registered nicknames. :(

Wonder what's involved in running my own IRCd.

EDIT: I am now using jPilot jIRC Java Chat. Best $50 I've spent.

feldon23 02-10-2003 01:00 AM

Quote:

S1R1US said:
btw will this display half-op status also? how bout voiced? i've seen one with hop before but not voiced
The mIRC script passes ops, half-ops, voiced, and regular users to the PHP script. In the PHP script, you have complete control over how each of the 4 groups' names are styled and prefixed.

feldon23 02-10-2003 01:08 AM

Quote:

VeloCD said:
It works perfectly now, great hack!

I had requested this in Eyeball's last hack, and that is is there a way to grab the topic from the channel in the chat, then I could display that variable?
Looking good!

The topic thing has some challenges to it. I'd have to emulate stripslashes in mIRC somehow, deal with spaces, etc. I'll look into this.

Is this something that should be in the full release, or a special version? What other things do people want added?

Velocd 02-10-2003 01:36 AM

Displaying the channel topic is about the only other addition for this hack I can think of that would be useful, if I can think of some other ideas I'll let you know :D

feldon23 02-10-2003 01:45 AM

Another point I must raise is that there are very real limits on the number of users this script can handle.

Because the list of users is being sent through a URL, you may slam into URL length problems if you have 60+ users in your chatroom.

I am paraphrasing here...
Although the RFC referring to URLs does not indicate a fixed length, Internet Explorer cannot handle more than 2083 characters in a URL and some proxy servers limit the # of characters to 255.

I am 99% sure that the PHP script will simply truncate a lengthy URL and provide an incomplete nick list, even if a nick boundary falls on a + character. I am not sure, however, what mIRC will do. It might fail to send any part of the URL.

I suppose some kind of buffering system could be created with "action=write" followed by a series of "action=append". Heaven help us if the appends arrive out of sequence.

Still, I'm pretty darn happy with how this hack is working.

VeloCD, you can imagine that adding the topic would be a huge stumbling block for URL length. A topic like this (from "A Fish Called Wanda"):
"It's k-k-k-Ken and he's c-c-c-coming to k-k-k-kill me!"

would expand to something like:
%26It's%20k-k-k-Ken%20and%20he%25s%20c-c-c-coming%20to%20k-k-k-kill%20me!%26

Again, I can forsee this being handled with "action=topic&topic=...", etc.

feldon23 02-10-2003 01:55 AM

Why do I get the feeling I'm going to be up all night writing 1.1. ? :(

The appends would have to be tagged so they can be reassembled in the right order at the other end. Ugh this is going to get messy. :)

Or I could take a crash course in MySQL and just append to the database, making sure that each of my append URLs finishes on a complete nickname.

JulianD 02-10-2003 02:07 AM

Thanks! I have to take a look at this hack! :)

S1R1US 02-10-2003 10:44 AM

thanks for all your replies feldon!

So the chat u use can only be used for their network? cause i wanna be able to use it for Aniverse and have forum users click the chan name and it connect with the java applet u have. I've seen them before but I like the way yours looks the best.

S1R1US 02-10-2003 10:45 AM

hey whats it mean when someone says run the file from AdminCP to install?

That was in the instructions of one of the hacks i'm trying to install and i have no clue how to do that.

Also what is Query's and how do i do them. Will need step by step on this one cause have not a single clue what it is, what it does, how to do it, or where to do it at^_^

Thanks

feldon23 02-10-2003 12:10 PM

Quote:

Sirius said:
So the chat u use can only be used for their network? cause i wanna be able to use it for Aniverse and have forum users click the chan name and it connect with the java applet u have. I've seen them before but I like the way yours looks the best.
The webmaster backpack java applet only works with webchat servers. Actually, what you see on my forum is incredibly stripped down. I turned off most of the buttons to make it easy for first-time chatters.

Quote:

hey whats it mean when someone says run the file from AdminCP to install?

That was in the instructions of one of the hacks i'm trying to install and i have no clue how to do that.
Because of the complexity of installing some hacks (modifying 20-30 files), people have started to write smart installers to automate the process. If you look around, you'll see that more and more hacks come as "vbHacker installable". My IRCBrowse hack does not have an installer because you only modify one file to use it.

Quote:

Also what is Query's and how do i do them. Will need step by step on this one cause have not a single clue what it is, what it does, how to do it, or where to do it at^_^
You know I have been doing PHP for about a month now, I just haven't gotten round to using MySQL much.

A query is how you get information FROM or write information TO the MySQL database your forum (or website) runs on. Queries can be incredibly complex, grabbing a ton of cross-linked information from various parts of the database and recombining it into a temporary array which is then merged with HTML to display a forum page or other such tasks.

The reason why we talk about queries is that each MySQL query, no matter how simple or complex, adds to the load your server uses. But in many cases you do not have a choice. Each PHP page needs to do MySQL queries to get the information necessary to display the forum home, or a forum thread list, or to do a search, or to handle attachments, etc.

If you want to know how many users registered on your forum today and a MySQL query has not already been done to grab this information and provide it to the PHP script that's running, you'll have to do a query for it.

You can imagine that if someone comes out with a hack that does 5-10 queries and someone else does the same hack but it only does 1 query or even piggybacks on queries ALREADY being done on the page, then we'll probably favor that version of the hack!

Take your time, there's no rush to learn this stuff. :)

NuclioN 02-10-2003 12:31 PM

// This is the key you send from mIRC and vBulletin to make sure this script is not
// called by outsiders

What key?

feldon23 02-10-2003 12:40 PM

Make up a key number and put the same one in both places (mIRC and vBulletin), like 3049 or 2179.

Velocd 02-10-2003 03:28 PM

Quote:

VeloCD, you can imagine that adding the topic would be a huge stumbling block for URL length. A topic like this (from "A Fish Called Wanda"):
"It's k-k-k-Ken and he's c-c-c-coming to k-k-k-kill me!"

would expand to something like:
%26It's%20k-k-k-Ken%20and%20he%25s%20c-c-c-coming%20to%20k-k-k-kill%20me!%26
My coding in mIRC is very limited, and I'm not familar with the functions used there unlike PHP, but if you could somehow use a function similar to serialize() and unserialize(), you could convert the long and lengthy strings into byte-stream representations.

Maybe there is a related function in the C language iRC uses that is similar to serialize?

feldon23 02-10-2003 03:30 PM

Another possibility is to learn the protocols to do a POST method.

w596 02-11-2003 07:36 AM

Hey feldon23, You ROCK!!! Great Hack :D

Gryphon 02-12-2003 08:15 PM

My server is running php 4.0.6, I could not get this hack to work until I changed $_GET to $HTTP_GET_VARS and $_SERVER to $HTTP_SERVER_VARS, all it kept saying was "Nothing to do."

Works like a charm now.

feldon23 02-12-2003 08:24 PM

Sorry bout that. $_GET was added in 4.1. I will make it compatible with PHP3 & 4 in the next version.

Also going to try to allow for unlimited chatters.

Gryphon 02-12-2003 08:45 PM

I idle on about 15 channels across two servers, and the same channel that I wish to display exists on both servers. If someone joins or drops and such, it updates correctly; however after a few minutes it shows just my name. I assume this is displaying the channel from the other server of which I am the only one on it?

*(Edit added)
I plan on running it on a bot that is in about three channels on one server, just thought it would be nice if it worked otherwise, thanks.

feldon23 02-12-2003 10:01 PM

Well no amount of huffing and puffing will make QUIT work on a specific channel. And specifying a channel won't help your situation.

At this time, my script does not work predictably if you are joined in the same chat channel name on multiple servers.

I'll look into what's involved in abstracting my script such that you can specify which chat server's channel to respond to. Am I right to assume that you would never be joined to 2 different servers on the SAME chat network, such as having 2 joins to EFNet?

You can tell what chat network each of your Server windows is connected to by typing //echo $network in each one and looking at the result.

If you want, I can look at supporting this for 1.1. Already for 1.1, I hope to have:
-unlimited chatters
-passing the topic
-support for PHP 3 + 4

I really don't want this script to get too complex.

supreemball 02-12-2003 11:42 PM

Quote:

Originally posted by feldon23
I looked at the "IRCUsers" hack written by eyeball (aka supreemball) using the ftp mirc script coded by Rich@home.nl and I thought wow this is cool. Then I looked at what's involved.

*It modifies global.php, meaning that EVERY PAGE of your forum loads this information even though only index.php uses it.

heh.. i appreciate the alternate method of my own hack, and this might be at least *somewhat* better as far as not needing an ftp script.. i put it in global.php because i wanted to put my # of chatters on my vbhome(lite) page as well as forumhome (and anywhere else i might want to add in the future).

Quote:

*It adds 1,150 lines of code to your mIRC.
nice exaggeration :) yours does the same thing :)

Quote:

*Won't work if mIRC is in C:\Program Files\mIRC
add quotes to the local directory (ie. "C:\Program Files\mIRC" instead of just C:\Program Files\mIRC), and change the $mircdir variable in the mirc code to "C:\Program Files\mIRC" (with quotes) and it's fixed.

Quote:

*Requires 24/7 FTP access
heh, i don't know of any hosts whatsoever that DON'T allow ftp access to your own site 24/7.

Quote:

So I thought, why not have vBulletin AND mIRC interface with a PHP file?
Thank you eyeball and Rich for the inspiration to write this!
but at least you gave me props. thanks :)

feldon23 02-13-2003 12:16 AM

Quote:

supreemball said:
heh.. i appreciate the alternate method of my own hack, and this might be at least *somewhat* better as far as not needing an ftp script.. i put it in global.php because i wanted to put my # of chatters on my vbhome(lite) page as well as forumhome (and anywhere else i might want to add in the future).
I would not request this kind of information in my global.php. In your case, I'd have it in index.php and the index.php for your vbHome Lite.

Then again, your PHP script does not query a file when called. The next version of my script will possibly be completely integrated with vBulletin and write the info straight into the database. I'm still pondering this.

Quote:

I said:
*It adds 1,150 lines of code to your mIRC.
Quote:

supreemball said:
nice exaggeration :) yours does the same thing :)

Ok, I exaggerated the length of ftp.mrc by including the comments. Here's the actual numbers:

Number of lines added to vBulletin:
IRCBrowse 6
IRCUsers 2

Total number of lines added to mIRC:
IRCBrowse 51
IRCUsers 930 (900 by mIRC FTP client, 30 by IRCUsers)

Quote:

supreemball said:
add quotes to the local directory (ie. "C:\Program Files\mIRC" instead of just C:\Program Files\mIRC), and change the $mircdir variable in the mirc code to "C:\Program Files\mIRC" (with quotes) and it's fixed.
Good to know.
Quote:

supreemball said:
heh, i don't know of any hosts whatsoever that DON'T allow ftp access to your own site 24/7.
My point is that negotiating an FTP session every 5 minutes or maintaining an open FTP session 24/7 is not something I wish to do.

In an unscientific test, I shut off all my internet apps except mIRC and CuteFTP and made a comparison.

Connect to FTP, upload a file, disconnect
58 packets sent
51 packets received

IRCBrowse update
6 packets sent
5 packets received

I wrote this because I felt there was a better mousetrap. I didn't write it to rain on your or anyone else's parade. Work begins on 1.1 tonight.

Gryphon 02-13-2003 03:10 PM

Quote:

Originally posted by feldon23
The next version of my script will possibly be completely integrated with vBulletin and write the info straight into the database. I'm still pondering this.
I, personally, would prefer it did not. It is pretty light now and easily added to non-vB pages.

TheEDIGuy 02-26-2003 05:04 PM

Feldon, this is a great hack. I've had it installed for about a week now, and it works wonderfully. No problems whatsoever.

feldon23 02-26-2003 05:15 PM

Ok, I'm finally working on the next version of this.

It will remove the # of nicks limitation, support half-ops, add the ability to pass the topic, and let you pick which chat network you want it to respond to.

For instance if you are on #help on efnet and on dalnet, you can "marry" ircbrowse to efnet's #help.

Is there a big demand to run 2 copies of ircbrowse in the same mIRC?

feldon23 02-27-2003 09:26 AM

I'm sure you've heard it before. The dog ate my homework, etc.

IRCBrowse 2 was *finished*.

I did a final test which broke up the message into sections since mIRC craps out at over 999 chars in 1 string.

BLUE SCREEN OF ******* DEATH

Had to pull the plug to shut down.

Came back and aliases.ini is EMPTY. Stuff I have been writing for years which I have never gotten around to backing up or anything.

I have IRCBrowse 1 backed up of course, but 2 is gone like a fart in the wind.

I'll possibly re-create it, but not if it takes another 10 hours.

Anyone else seen a PC that craps out when large quantities of text are being passed around? I have uptimes of 45 days on this PC (windows 2000, SP2, Asus A7V133 w/ latest VIA 4-in-1, 1.4 GHz Athlon, 640MB RAM, plenty of HD space, GeForce 2 MX400 w/ 41.09).

I run Photoshop like a dog all the time, opening and closing huge documents constantly.

Then I go to telnet in a DOS window and paste an instruction that's 120 chars long and the computer BSODs.

I know my computer used to BSOD when sending large or complex e-mails out of Eudora. This turned out to be a driver prob with my Linksys ethernet card.

And I'm sure a forum moderator will be along to tell me this is off-topic. I'm a bit pissed so plz gimme some space just this once. This IS my first hack you know.

Highlander 03-08-2003 07:11 AM

it dont works.. there is nothing showing up.. i edited all variables.. correctly and tested it muuch times..

go to

www.spieleplanet.org/forum

TheEDIGuy 03-09-2003 04:58 PM

Feldon, if you *do* get around to re-creating version 2 (bummer, by the way), can you have the option to remove the IRCBrowse user out of the "in chat' list? I use "FORTbot" as my user, and obviously, it sits in the chatroom all day, reporting itself as being in chat. :)

feldon23 03-09-2003 07:41 PM

Quote:

TheEDIGuy said:
Feldon, if you *do* get around to re-creating version 2 (bummer, by the way), can you have the option to remove the IRCBrowse user out of the "in chat' list? I use "FORTbot" as my user, and obviously, it sits in the chatroom all day, reporting itself as being in chat.
I've been fiddling with mIRC scripts for about 4 years. I've been doing PHP for about 12 weeks. Sad isn't it, that I'd probably recommend fixing this in PHP instead of mIRC. :rolleyes:

In your index.php, I'd change...

PHP Code:

$ircbrowsetotal $ircbrowse['0'];
$ircbrowsehighest $ircbrowse['1'];
$ircbrowsenicks $ircbrowse['2'];
fclose ($tempfil); 

to

PHP Code:

$ircbrowsetotal $ircbrowse['0'];
$ircbrowsehighest $ircbrowse['1'];
$ircbrowsenicks str_replace("FORTbot, """$ircbrowse['2']);
fclose ($tempfil); 


feldon23 03-09-2003 07:55 PM

Quote:

Highlander said:
it dont works.. there is nothing showing up.. i edited all variables.. correctly and tested it muuch times..

go to

www.spieleplanet.org/forum

If you are not running PHP4, please search-and-replace in ircbrowse.php for:

$_GET

and replace it with

$HTTP_GET_VARS

IRCBrowse 2 fixes(d) this.


All times are GMT. The time now is 04:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01467 seconds
  • Memory Usage 1,864KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete