vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Current IRC chatters on forumhome via mirc (no eggdrop) (https://vborg.vbsupport.ru/showthread.php?t=46949)

supreemball 12-23-2002 10:00 PM

Current IRC chatters on forumhome via mirc (no eggdrop)
 
Current IRC Channel Chatters on Forumhome Hack
-written by eyeball (aka supreemball) of http://www.somethingleet.com (ftp mirc script coded by Rich@home.nl)

NEW VERSION updated 01/02/03! :D
- added support for halfops
- added commas (no comma on last nick either :))
- added 'total nicks ever on ' specified #channel

to upgrade from the previous version, replace the code in mirc and the forumhome_loggedinusers template. you don't have to overwrite the ftp.mrc file or mess with global.php while upgrading, nothing's changed with those.

This hack shows a specified IRC channel's current userlist, total # of users, and status of each user
(opped, voiced, or normal, including bold/italics for each category), all on your vb forum's main page.
This hack ONLY requires ftp access to the forum server, and <a href="http://www.mirc.com">mIRC</a> 5.91 or above (constantly connected to the channel). No bots or java irc crap needed! (mirc script code can be added to mirc-based bots though.)

A live demo of this hack is shown @ http://www.somethingleet.com/forum/index.php (shown below
the Current Online Forum Users list).

Files modified:
global.php
access.ini (used in mirc)

Templates modified:
forumhome_loggedinusers

Install.txt & needed files attached.

For support, reply to this thread or email eye@somethingleet.com.

(Hack only tested on vb2.2.6, but should work on all other 2.2.* versions)

NOTE: This hack assumes the mirc user (yourself or someone else) has full access to your ftp server via ftp. I'm not held responsible if you accidentally give this hack to someone using mirc (which in turn you would have to give the mirc user your ftp login info).

Enjoy :)

Velocd 12-23-2002 11:13 PM

Awesome, I hope it is one I can get installed then actually working ;)

[high]* Velocd clicks install for now :p[/high]

Velocd 12-23-2002 11:25 PM

I can understand:

Code:

c:\path\to\mirc\nicks.php
But what should be replaced here?

Code:

remote/path/to/forum/nicks.php
nicks.php does not exist in my forums directory. Did you want this uploaded?

supreemball 12-23-2002 11:29 PM

no, but it will eventually be uploaded when you run the "/getnicks" command in mirc.

GoTTi 12-24-2002 04:27 AM

* /ftp.upload: connecting (FTPsock1 to ftp.SITE.com file:nicks.php)
* /ftp.upload: connected (FTPsock1 to ftp.SITE.com file:nicks.php)
* /ftp.upload: error: (( Welcome to PureFTPd 1.0.12 )) .:.-=(<*>)=- (FTPsock1 to ftp.SITE.com file:nicks.php)
* /ftp.upload: closing (FTPsock1 to ftp.SITE.com file:nicks.php)

Mystis 12-24-2002 04:46 AM

Go eye :D

supreemball 12-24-2002 06:36 AM

ftp.SITE.com doesn't seem to be a valid url. :)

GoTTi 12-24-2002 06:58 AM

???

that didnt help me lol..I put SITE to show what I edited in the file...

My real site info is in there, that is what comes up in mIRC when I ran the command....

It didn't upload the file to the site.

I made a Sub-Domain, and made a testboard to see if it would run, and I didn't get anything yet. It did make the .php file in the mIRC folder on my computer though...

Whats the scenario? Why isn't it uploading?

Velocd 12-24-2002 02:00 PM

Your password/username for your FTP may be incorrect, or the path to which the file is located. (which should be public_html/forum/nicks.php, or whatever your folders are named).

------------------

Hey Supreemball, how might I get it so the nicks are seperated by comma's? You should be able to use str_replace(), explode(), or rtrim() to achieve it..although with some effort last night I just couldn't get it to go..

Also, is there any way to log the most users that have ever been the channel at one time?

Floris 12-24-2002 03:53 PM

This is why:

The ftp.mrc only requires a certain reply from the ftp and doesn't accept the welcome msg or other stuff - so it doesn't give the user/pass at the right time. And errors.

GoTTi 12-24-2002 05:28 PM

thats what i was thinking xiphod....

GoTTi 12-24-2002 05:39 PM

is there a way to put a delay in the script?

Velocd 12-24-2002 05:49 PM

If the miRC remote tab, you can change the value 120 (2 minutes) to whatever you like, which will either increase or decrease the time it refreshes.

Is that what you meant? ;)

supreemball 12-24-2002 06:59 PM

Quote:

Originally posted by Velocd
Hey Supreemball, how might I get it so the nicks are seperated by comma's? You should be able to use str_replace(), explode(), or rtrim() to achieve it..although with some effort last night I just couldn't get it to go..

Also, is there any way to log the most users that have ever been the channel at one time?

you can do the most users in the channel with no problem.. i might release that in the next version.. it'd be done thru the mirc script code.

also the commas can be done thru mirc script code too.

use this as the code (to replace the line similar to it)

Code:

    write -a nicks.php <b>@ $+ $nick(#channel,%x) $+ </b> $+ , }

Velocd 12-24-2002 07:38 PM

Quote:

Originally posted by supreemball

also the commas can be done thru mirc script code too.

use this as the code (to replace the line similar to it)

Code:

    write -a nicks.php <b>@ $+ $nick(#channel,%x) $+ </b> $+ , }

I figured how to do that, but that leaves a trailing comma at the end of the last username..

ie: users in chat: bob, joe, mike, chris,

Anyway to simply code it in that mIRC script to prevent the last comma from showing? ;)

supreemball 12-24-2002 08:07 PM

heh, not that i know of.. that's probably why i didn't use commas in the first place :)

Velocd 12-24-2002 08:17 PM

Well, I can figure it out easily, but I need to know how you can get the users in the PHP file to be displayed without skipping lines ;)

For example, currently it's outputted like this:
PHP Code:

$ircusers "

Bob

Jacob

Chris

"


But, how can I get it like this:

PHP Code:

$ircusers="bob jacob chris"


Schorsch 12-24-2002 09:16 PM

thanks, is working great :)

but I also would like to know how I can separate the names with a comma.

regards,
Schorsch

EDIT: it doesn't show the % of halfops. How can I change that ?

supreemball 12-24-2002 11:20 PM

Quote:

Originally posted by Velocd

But, how can I get it like this:

PHP Code:

$ircusers="bob jacob chris"


if you put it like that, then, provided that your channel has alot of chatters (like up to 20 depending on their nick length), eventually will probably produce a 'line too long' error in mirc and stop reporting the chatters correctly, so this is why it goes to each line, to stop it from doing that. i have an average of 30-40 chatters in my room at all times, so it's impossible for me to do that and it work right :)

as far as adding commas, i know it can be done, but it's alot of trouble.. maybe if i have some more spare time soon.

supreemball 12-24-2002 11:20 PM

Quote:

Originally posted by Schorsch
EDIT: it doesn't show the % of halfops. How can I change that ?
% of halfops? what do you mean?

Schorsch 12-24-2002 11:56 PM

Quote:

Originally posted by supreemball


% of halfops? what do you mean?

look at the attachment. this is a "half op", signed with a "%", and in your "whos online in irc" it doesn't show that % sign.

+ (voice) and @ (op) I can see without problems.

Floris 12-25-2002 08:42 AM

Did anybody find a solution for the problem where the login msg makes it error and not log in ?

Floris 12-25-2002 08:45 AM

About the last comma in the line
Maybe you could do $len(%variablewithnicks) and then $calc(%resultoflen -1) on $left(%resultofcal)

set %mooA $len(%variableofthenicks)
set %mooB $calc(%mooA -1)
set %mooC $left(%mooA,%mooC)
echo -a All the nicks without the last , makes > %mooC

tada

The author of the script could probably update the ftp.mrc pretty quick for you since he is known with the tokens.

Keta 12-25-2002 03:52 PM

nice hack will use :)

andrew67 12-26-2002 01:35 AM

Wicked hack and worked first go!!! Thanks!!! Just one thing how can I call the $variables on a non vb page like on the main page of vbportal? I add the code and it just returns a blank space... Any Ideas?

Velocd 12-26-2002 03:50 AM

Add the require("nicks.php"); code under where you have require("global.php"); on your vbportal index.php page (if I'm presuming it's like vbhome)

Any updates on this Supreemball? All I could really care for right now is to log the most users ever in the iRC channel, but Xiphoid added a method to removing the last comma above ;)

andrew67 12-26-2002 05:47 AM

Quote:

Originally posted by Velocd
Add the require("nicks.php"); code under where you have require("global.php"); on your vbportal index.php page (if I'm presuming it's like vbhome)

Thanks but it no work... I can't find where it calls global.php in Vbportal anywhere but I tried adding require("nicks.php"); to both my index and my header.php files to no avail.. :(

Kars10 12-26-2002 07:25 AM

Quote:

Originally posted by xiphoid
About the last comma in the line
Maybe you could do $len(%variablewithnicks) and then $calc(%resultoflen -1) on $left(%resultofcal)

set %mooA $len(%variableofthenicks)
set %mooB $calc(%mooA -1)
set %mooC $left(%mooA,%mooC)
echo -a All the nicks without the last , makes > %mooC

tada

The author of the script could probably update the ftp.mrc pretty quick for you since he is known with the tokens.

Sorry, but don?t get the comma-thing...
What exactly could i do to get commas after the users names??
Can someone please modify the ftp.mrc and attach it??
By the way cool hack, works like a charm... :)

orozery 12-26-2002 09:31 AM

Very nice hack! Thank you!!

Velocd 12-26-2002 03:10 PM

Quote:

Originally posted by andrew67


Thanks but it no work... I can't find where it calls global.php in Vbportal anywhere but I tried adding require("nicks.php"); to both my index and my header.php files to no avail.. :(

I can't imagine vBportal functioning without requiring global.php, but if it's non-existent then find:

PHP Code:

error_reporting(7); 

And below it add:
PHP Code:

chdir("./forums");
require(
"nicks.php"); 

Change "forums" to whatever your forums directory is called.

Schorsch 12-26-2002 03:13 PM

any advice about this half op thing ?

regards,
Schorsch

GoTTi 12-26-2002 10:07 PM

problem with script...

in the new versions of mirc, you can multi server connect, instead of opening multiple mIRC's to be on different servers...well i use this option...

when on 2 or more servers, but in the channel I use the script for, it records the data as 0 being no1 in the channel...

What would need to be added to the script or whatever, to make it look on 1 server and in that 1 channel? IN a multi load situation.

supreemball 12-26-2002 11:44 PM

ok by popular demand, i'll add the commas (without the trailing one on the last nick) in the next release, as well as the halfop support, and will probably even add 'most chat users' as well (and i can guarantee that the most chat users will work better than vb's). :)

Velocd 12-27-2002 01:56 AM

Awesome, sounds keen supreemball ;)

Davey 12-27-2002 12:25 PM

Quote:

Originally posted by Da_GoTTi
problem with script...

in the new versions of mirc, you can multi server connect, instead of opening multiple mIRC's to be on different servers...well i use this option...

when on 2 or more servers, but in the channel I use the script for, it records the data as 0 being no1 in the channel...

What would need to be added to the script or whatever, to make it look on 1 server and in that 1 channel? IN a multi load situation.

Yes, multiserver works like this: The first server you connect to, has the id '1', the second server has the id '2', etc.
The identifier to get the connection ID of the current active server is $cid. So you might use if ($cid == 1) { blah | blah }.

Dave.

PS: The above is for people with version 6.* of mIRC.

pugmy 12-27-2002 09:42 PM

Quote:

Originally posted by xiphoid
Did anybody find a solution for the problem where the login msg makes it error and not log in ?
I'm having the same problem---can't login because my ftp login messages are multiple lines and make a login error. Unfortunately I can't adjust ftp server messasges. How can I fix the problem, anyone?

about halfop, i added a line like this:
Code:

    elseif ($nick(#channel,%x) ishop #channel) {
    write -a nicks.php <b> % $+ $nick(#channel,%x) $+ </b> $+  }

it works for me.

Schorsch 12-27-2002 09:57 PM

Quote:

Originally posted by pugmy
about halfop, i added a line like this:
Code:

    elseif ($nick(#channel,%x) ishop #channel) {
    write -a nicks.php <b> % $+ $nick(#channel,%x) $+ </b> $+  }

it works for me.

thank you, that works great :)

TheVoidz 12-29-2002 04:50 PM

I have the same problem with the upload not working properly, after playing around with the ftp.mrc file I got it to work (might not be the most efficient way, but it works). Still throws some errors at the end after the file is uploaded but it gets nicks.php from point A to point B and thats all that really matters to me. Can't guarantee it will work, but it worked for me :)

-- Open ftp.mrc and find:
Code:

on *:SOCKREAD:FTPsock*:{
-- Right after that add:
Code:

:retry
-- Find (also in ftp.mrc):
Code:

if ($1 != 220) {
ftp.error $sockname $2-
return
}

-- Replace it with:
Code:

if ($1 != 220) {
goto retry
}

-- Find (also in ftp.mrc):
Code:

if ($1 != 331) {
ftp.error $sockname $2-
return
}

-- Replace it with:
Code:

if ($1 != 331) {
goto retry
}

-- Find (also in ftp.mrc):
Code:

if ($1 != 230) {
ftp.error $sockname $2-
return
}

-- Replace it with:
Code:

if ($1 != 230) {
goto retry
}


sebastien69 12-31-2002 03:29 AM

Nice hack but how make it to work

it wasn't clear for me here

/ftp.upload -dfl ftp.yourserver.com ftpusername ftppassword remote/path/to/forum/nicks.php c:\path\to\mirc\nicks.php


i do

/ftp.upload -dfl ftp://user:pass@ip:port
remote/path/to/nicks.php C:\Program Files\mirc\nicks.php

and i got this error /ftp.upload: invalid port

if i do

ftp.upload -dfl remote ftp://user:pass@ip:port
/path/to/nicks.php C:\Program Files\mirc\nicks.php

i got this error /ftp.upload: invalid file

could you explain me what i get this error please

The script seem working but how make it to work?????????????

DaTeX 01-02-2003 08:34 AM

Did anyone make a "most ever online" for this chat system ?? That would be great.


All times are GMT. The time now is 04:47 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.01380 seconds
  • Memory Usage 1,839KB
  • 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
  • (14)bbcode_code_printable
  • (5)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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