This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

create a webpage with /lusers info

Old posts that have not been replied to for several years.
o
openglx

Post by openglx »

Hi

I created a new irc network, and I run some eggdrops on it. I would like to know with anybody could code a tcl for me that get the /lusers info, like actual ircops on the server, number of users and so..

Thanks all
o
openglx

Post by openglx »


sorry by the spam here, but anyone who talk portuguese it's welcome to irc.openglx.com.br
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Once it gets the info, what should it do with it? Put it in a file, a webpage, dcc, email it to you, print it and mail it to the moon, what? :smile:
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

note the topic title wcc :razz:
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Oops, hehe, ya I can make that for ya
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

J
JaSoN

Post by JaSoN »

heya,
like this tcl ... i tried it with /list & /links but it doesnt work ... the only thing i see is --> End of List :smile: Can someone help me, writing this tcl, i dun need a html file. 2 *.txt files (1 for /list & 1 for /links) would be enough for it.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Sure, I can have it done by later today.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

J
JaSoN

Post by JaSoN »

Thank you Wcc, it works fine :smile:
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

no problem :razz:
s
sirgrim

Post by sirgrim »

sorry, not my forum, just wanted to say WCC is god! Thanks for this too hehehe.
s
sirgrim

Post by sirgrim »

what lines should be commented out to prevent the /list from being displayed. Way to many channels on my server =P.
s
sirgrim

Post by sirgrim »

n/m found it.
s
sirgrim

Post by sirgrim »

Hax'd this up a little. Here are the changes I made to make it purdier for a page.

proc netstats_do_final {} {
global netstats_setting netstats_links_data netstats_localserver netstats_list_data netstats_lusers_data
set ffd [open $netstats_setting(file_output) w+]
puts $ffd "<center>"
puts $ffd "Network Stats"
puts $ffd "Connected to $netstats_localserver"
puts $ffd "n"
puts $ffd "/LUSERS:"
foreach i [array names netstats_lusers_data] {
puts $ffd "$netstats_lusers_data($i)"
}
# puts $ffd "n"
# puts $ffd "/LIST:"
# foreach i [array names netstats_list_data] {
# regsub -all -- ":$" "[join $netstats_list_data($i)]" "" text2
# puts $ffd "$i $text2"
# }
puts $ffd "n"
puts $ffd "/MAP:"
puts $ffd " $netstats_localserver "
netstats_do_netmap " " $ffd $netstats_localserver
puts $ffd "n"
puts $ffd "/LINKS:"
foreach i [array names netstats_links_data] {
puts $ffd "[join $netstats_links_data($i)]"
}
puts $ffd "</center>"
close $ffd
puthelp "[exec /bin/netstats]"
}

Notice the <center> and </center> added, and the puthelp "[exec /bin/netstats]" I would have had the regular execute, but tcl didn't like the pipes, etc, so here's my /bin/netstats:

cat /www/htdocs/netstats/netstats.txt|perl -p -e 's/n/<br>n/g'>/www/htdocs/netstats/netstats2.txt

just chmod +x that so it's executable, which just puts <br>s at the end of each line, so it's not all jumbled together. Then I just <?php include("netstats2.txt"); ?> cause php is the shizit. here is my page with it if you want to see it in action. http://wagd.com/netstats/ Thanks everyone! *Hugs WCC*
Locked