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 02-09-2003 12:30 AM

Ok, now that I finially have some time,
Streamzone, I've checked my script here and it is stripping the ~ mark from the user name. I tried to go to your forums to check it out, but there was a problem in the link.

Could you mail me a copy of the bot's output so i can see where its going wrong - and maybe a link so i can see in real time :)

Steven_TN, I havn't forgotten you, but that modification will take me a little while. And the wife has been claiming priority ;)

Dan

Kars10 03-03-2003 07:57 PM

Hello Sasq, can you please help me/us with the commas after the usernames?

Thanks in advance! :)

Kars10 03-05-2003 09:13 AM

?hm, ^bumb^ ;)

Sasq 03-08-2003 08:41 AM

Havn't forgotten, just busy as hell with work. I have a working version somewhere of the non db lookup, still gotta tweak the db lookup.

Dan

Sasq 03-10-2003 02:05 PM

ok, mods done, 1am in the morning i'll post the updated file tomorrow night when i get back from the salt mines.

Dan

Sasq 03-12-2003 12:14 PM

OK, mods up, come and get 'em.

Sorry it took so long, but the work got in the way of enjoyment.

Dan

Kars10 03-12-2003 12:34 PM

Cool !!
Thanks Sasq!! Will update right now. :)

Kars10 03-12-2003 12:46 PM

Works like a charm!!!
Thank you very much... ;)

Sasq 03-12-2003 12:58 PM

np, like I said, sorry guys (and girls) for takeing so long, just been snowed under at work

Dan

Bumpaneer 03-19-2003 12:27 AM

So is adding the symbols in front of the usernames possible (the @, %, etc). Also I have superops on my irc channel (! symbol) Can this be included too?

Thanks for this great hack,
~Bumpaneer

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

Bumpaneer 04-14-2003 12:36 AM

Found this code, dunno if it help...

PHP Code:

# Location to save files 
set location "/home/ircadmin/MonkBOT/userlists/" 

# Channel to watch 
set chan "#unrealplayground" 

# How often to update file in minutes 
set updatetime 2 

# Check to see if the timer is running - only needed really during a .rehash 

putlog "users2list.tcl v1.0 has started" 

if {![info exists fileusers_running]} { 
  
timer $updatetime fileusers 
  set fileusers_running 1 


proc fileusers {} { 
  global 
updatetime chan file location 
  
if {![validchan $chan]} { 
    
putlog "ERROR - users2file.tcl - I am not on $chan, so I cannot output lists" 
    
return 
  

  
set l1 [chanlist $chan
  
set l2 {} 
  
set l3 {} 
  foreach 
u $l1 
    if {[
isop $u $chan]} { 
      
lappend l3 "@" 
    
} elseif {[isvoice $u $chan]} { 
      
lappend l3 "+v" 
    
} else { 
      
lappend l3 "" 
    

    
lappend l3 $u 
    lappend l3 
[getchanidle $u $chan
    
lappend l3 "[getchanhost $u $chan]" 
    
lappend l2 [join $l3 {,}] 
    
set l3 {} 
  } 

  
#write the files 
  
set fp [open "${location}${chan}.users.txt" w
  
puts $fp [join $l1 {,}] 
  
close $fp 
  set fp 
[open "${location}${chan}.status.txt" w
  
puts $fp [join $l2 \n
  
close $fp 

  
#restart the timer 
  
timer $updatetime fileusers 



Sasq 04-14-2003 12:50 AM

Danke, that should help :D sort something soon

Bumpaneer 04-24-2003 11:51 AM

Any luck?

Hellburn 05-02-2003 08:31 AM

Hi,

i have a little trouble with this hack. i have installed him on 2 difference servers. on the first server (suse) he is working perfectly but on the second Server (debian) he shows me always 'IRC Server Fault / Chatter=0'. I have installed the same nodbremote.txt and template on the servers. Please help me.

Greats
Hellburn

StevenTN 06-21-2003 05:01 PM

I finally installed the updated hack (I waited until a necessary upgrade to do so).

Great job with it!

Ogmuk 11-07-2003 11:11 PM

The bot works normally but when I add "source scripts/usc.tcl" to my eggdrop.conf and upload the file into the scripts directory it results in the following error:

Quote:

[18:05]Tcl error in file 'eggdrop.conf':
[18:05] invalid channel: #mychannel
while executing
"chanlist $i2h_chan"
(procedure "i2h:make" line 5)
invoked from within
"i2h:make"
(file "scripts/usc.tcl" line 57)
invoked from within
"source scripts/usc.tcl"
(file "eggdrop.conf" line 1338)
[18:05] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

Ogmuk 11-08-2003 05:25 PM

This was solved... there was a problem in eggdrop.conf.

Ogmuk 11-08-2003 11:05 PM

Great hack. I hope that you'll release a vb3 version once the RC1 is released.

(sorry if this was already discussed earlier in this thread... I didn't have the time to read every page)

Bumpaneer 11-14-2003 04:11 PM

Customized it a bit for my forum: here is what I came up with.
Usernames are arranged by status, then alphabetically. Each group is also color coded. Attached is a screenshot, and my working code.

walkingthepath 11-15-2003 11:54 PM

having problems.... I keep getting Tcl error in script for 'timer1369': and the number randomly changes when I restart the bot. Once is that timer1111 and so on... What do I do??

StevenTN 12-26-2003 01:33 AM

I have a vB3 version ready (which is much easier to do I must say versus modifying the index.php file, making it more painless when upgrading vB).

So far it's only for those who don't do DB lookups. I can modify the rest as necessary.

All I did was stick the required code in the phpinclude_start template, and followed the rest of the directions. I also modified the custom template so it better goes with the vB3 template system. So far it's working great. But if you want it, let me know.

EDIT: I added the vB3 version...

https://vborg.vbsupport.ru/showthread.php?t=59672

walkingthepath 01-19-2004 02:20 AM

getting the following error-

Warning: Invalid argument supplied for foreach() in /home/walkingt/public_html/forum/index.php on line 571

Warning: Invalid argument supplied for foreach() in /home/walkingt/public_html/forum/index.php on line 571

Warning: Invalid argument supplied for foreach() in /home/walkingt/public_html/forum/index.php on line 571



What should I do??

Rushty 01-19-2004 10:07 AM

im having problems with the usc2.tcl script, im running eggdrop on a remote server and when I try to start eggdrop with the usc2.tcl script i get the following error:

can't read "state(status)": no such variable
while executing
"if {$state(status) != "ok"} {
putlog "Connection to server error: $state(status)"
} else {
set errnum [::http::ncode $token]
if {$errnum == 200} {
} e..."
(procedure "i3h:make" line 21)
invoked from within
"i3h:make"
(file "scripts/usc2.tcl" line 54)
invoked from within
"source scripts/usc2.tcl"
(file "eggdrop.conf" line 1394)

anyone got any ideas whats up?

walkingthepath 01-21-2004 02:02 AM

Fixed previous error, getting new errors from eggy: Connection to server error: HTTP/1.1 302 Found. What's wrong? how do I fix/?


All times are GMT. The time now is 04:19 AM.

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.01250 seconds
  • Memory Usage 1,842KB
  • 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
  • (7)bbcode_php_printable
  • (1)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
  • (34)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