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)
-   -   Users in IRC - with eggdrop. html access (https://vborg.vbsupport.ru/showthread.php?t=46305)

Sasq 03-21-2003 12:36 AM

possible, yes. And if your not using the DB lookup I can churn out something fairly soon. (damn last week of work and busy as all .....)
If you want intergration to the db lookup as well, I'll need a little longer.

Dan

Bumpaneer 03-21-2003 02:16 AM

Nope, not using DB lookup :cool:

Thanks,
~Bumpaneer

aibon 03-21-2003 10:42 AM

great hack. thx sasq.

i use the nodblocal method, but changed it to store the data in th db instead of writing a local file. post it here, perhaps someone finds this useful.

here's the code for call.php:

PHP Code:

$accessip "255.255.255.255"//accepts wildcards so '255.255.255.*' is ok
$ip getenv("REMOTE_ADDR");
$accesscode "passwd";

if ((
$HTTP_POST_VARS[access] == $accesscode)&&(ereg($accessip$ip))&&(!empty($HTTP_POST_VARS)))
{
   include(
"./admin/config.php");
   include(
'./admin/db_mysql.php');
   
$DB_site=new DB_Sql_vb;
   
$DB_site->database=$dbname;
   
$DB_site->server=$servername;
   
$DB_site->user=$dbusername;
   
$DB_site->password=$dbpassword;
   
$DB_site->connect();
   
$dbpassword="";
   
$DB_site->password="";

   unset (
$HTTP_POST_VARS[access]);
   
$posuf $HTTP_POST_VARS[users];
   
$posuf str_replace(" ""%20"$posuf);

   
$DB_site->query("UPDATE irconline SET data='".addslashes($posuf)."', timestamp='".time()."' WHERE id=1");


2 changes for index.php (no matter if db or nodb):

replace:
PHP Code:

if ((!file_exists($onlinefile))||(filemtime($onlinefile)<(time()-($ircfaulttime*60)))) { //check the existance and time out of the file 

with
PHP Code:

$checkdate time()-($ircfaulttime*60);
if (!(
$users $DB_site->query_first("SELECT * FROM irconline WHERE id=1 AND timestamp>='$checkdate'"))) { 

replace
PHP Code:

$file fopen($onlinefile"r");
while (!
feof($file)) {
        
$buffer .= fgets($file4096);
}
        
fclose($file);
$buffer strip_tags ($buffer);   //get rid of any php or html tags etc
$buffer chop($buffer);          //get rid of the white space

/// routine for placeing the user details into an array and getting online numbers
        
$temparray explode ("%20"$buffer); 

with
PHP Code:

   $temparray explode ("%20"$users[data]); 

the sql:

PHP Code:

CREATE TABLE irconline (
  
id int(10unsigned NOT NULL auto_increment,
  
data text NOT NULL,
  
timestamp int(10unsigned NOT NULL default '0',
  
PRIMARY KEY  (id)
TYPE=MyISAM;

INSERT INTO irconline VALUES (1,'empty',0

that's all, everything else stays the same.

Sasq 03-22-2003 12:47 AM

Cool thanks, I've been meaning to do an sql version of it. I've just been busy with a site upgrade.

Just installed a rather hacked version of vbportal, with all the insuing mods etc.

I have more time from next week end, so I'll intergrate you mod into the install package (with credits of course) :)

One week of the slave pit to go - woohoo

Dan

Bumpaneer 03-26-2003 07:07 PM

Any progress?

~Bumpaneer

Sasq 04-04-2003 12:02 PM

A little, Only finished work on monday - yay I'm free, however the wife wants some QT first.

Dan

Bumpaneer 04-04-2003 03:49 PM

Ok, take care of the woman

Bumpaneer 04-09-2003 03:41 PM

Another question.... Can this be modified to keep track of what the max numbers of users was, and when? Kinda like the online users does now.

Thanks,
~Bumpaneer

Sasq 04-13-2003 10:27 AM

Ok, just so you know I'm thinking of you..
I just played with the bot, and I can't get it to supply the nicks with an Op etc atm - it could just be my ancient bot - I'll do some more research.

max numbers etc... doable just thinking about the best way to do it.

Integrate the hack into the db, or keep it all as a flat file.

I'll see what i can come up with

Dan

Bumpaneer 04-13-2003 11:55 PM

Cool, thanks


All times are GMT. The time now is 09:51 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.01167 seconds
  • Memory Usage 1,757KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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