Anope IRC Services

Anope Development => Modules => Topic started by: Mike on April 18, 2009, 11:08:54 PM

Title: Channel Statistics Module
Post by: Mike on April 18, 2009, 11:08:54 PM
Is there anyone who can put together a channel stats module, one that will list the users on the channel, something like if there is 5 people in the room the module will create a list and output it to a html page or to a page that can be read an updated by the module.

Users Online
Nick1
Nick2
Nick3
Nick4
Nick5

And so on depending how many people join the room?

 Thanks Mike

edit using services 1.9 and inspircd1.2
Title: Re: Channel Statistics Module
Post by: Amanda Folson on April 18, 2009, 11:12:17 PM
Can you not use Denora? That does the same thing and more :P
Title: Re: Channel Statistics Module
Post by: Mike on April 18, 2009, 11:28:32 PM
i can, but its being a pain in the ass LOL its crashing with inspircd 1.2 version
Title: Re: Channel Statistics Module
Post by: Mike on April 18, 2009, 11:31:10 PM
By the way, the main reason i need this is so i can have an eggdrop read the output file and create an html list on a webpage so people can see who is already chatting in the room. to see if any of their friends are online. via a list on the side of their channel rooms homepage

basically so i can have eggdrop read the page it will create an output like

Users Online (5)
Nick1
Nick2
Nick3
Nick4
Nick5
Title: Re: Channel Statistics Module
Post by: Han on April 18, 2009, 11:46:51 PM
maybee you want this
http://www.phpbb2.de/rlink/rlink.php?url=http://wiki.blitzed.org/Channel_user_list

greets Han`
Title: Re: Channel Statistics Module
Post by: Mike on April 19, 2009, 01:12:13 AM
Thats not working, it only works with their server, it appears.
Title: Re: Channel Statistics Module
Post by: Mike on April 19, 2009, 02:32:49 AM
i can, but its being a pain in the ass LOL its crashing with inspircd 1.2 version
well i tried, but i cant get denora to work its giving me segmentation faults an such, and i really want to download the SVN version but i dont see a specific link to download a tar?
Title: Re: Channel Statistics Module
Post by: Mike on April 19, 2009, 02:34:01 AM
Can you not use Denora? That does the same thing and more :P
sorry the above post was to you, wrong quote button.
Title: Re: Channel Statistics Module
Post by: mooncup on April 19, 2009, 06:58:48 PM
I think Denora is eventually going to rebecome and anope module again, which would effectively be this. I'm not entirely sure though, you'd need to check with Hal.
Title: Re: Channel Statistics Module
Post by: Amanda Folson on April 19, 2009, 07:05:24 PM
Yes, it will eventally become part of Anope. To get the SVN version you need an SVN client. The instructions are on the Denora page if you need them.
Title: Re: Channel Statistics Module
Post by: Mike on April 21, 2009, 06:54:59 PM
Yes, it will eventally become part of Anope. To get the SVN version you need an SVN client. The instructions are on the Denora page if you need them.
I got the SVN of denora, its coming to my server, requesting stats u and dying, but i cant seem to see why, its not telling me and i couldnt get much help reading the denora wiki(there isnt one) lol and denora forums are rarely answered. it comes on joins the channel i specified in the config, it changes a load of modes while it first comes(or its reading) and right after that gone, it never stays linked as a server. after it stops i see "User defined signal 1"

gdb listed

(gdb) run stats
Starting program: /usr/home/mike/stats/stats stats
[New LWP 100130]
[New Thread 0x800f02180 (LWP 100130)]
Non-option arguments not allowed
Denora not started

Program exited with code 01.

and that seems to be all i can find outm unless theres another command?
Title: Re: Channel Statistics Module
Post by: mooncup on April 22, 2009, 11:58:14 AM
That error is saying to me that ./stats stats isn't the command to start denora.

I'm not sure of the actual syntax but try /usr/home/mike/stats/stats
Title: Re: Channel Statistics Module
Post by: Jobe on April 22, 2009, 04:22:03 PM
The correct syntax is just ./stats or with debug ./stats -debug -nofork etc...

See the README file for more info on command line parameters for Denora.
Title: Re: Channel Statistics Module
Post by: Julian on April 22, 2009, 04:38:54 PM
i can, but its being a pain in the ass LOL its crashing with inspircd 1.2 version

I was told Denora has a fit with InspIRCd V1.2.

It throws out this error...

Quote
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
Title: Re: Channel Statistics Module
Post by: Mike on April 22, 2009, 07:01:05 PM
I dont know why, i just tested the windows version and it worked, except when i tried to log in as admin it killed it, and it linked fine to my server (InspIRCd 1.2) i went through the config and did the same thing on the windows box an the bsd box and it still dont work, everything else i use does BUT this, the funny thing is i got it to work on BSD and it just enters the server and channel i specify requests stats u and dies and no output in the logs or nothing so im just stuck here. shame because i want to use this it looks great on the windows side but i dont like hosting stuff on windows.
Title: Re: Channel Statistics Module
Post by: MrStonedone on September 08, 2009, 01:12:34 AM
eggdrop is tcl... using 1.6.19 tcl 8.5 you can do something like this

Code: [Select]
set chan #chanhere
set list [chanlist $chan]
set users [join $list \n]
set numusers [llength $list]
users will be a list of users with each user being on its own line.

not to hard to do what you want to do in a eggdrop since this thread isn't helping and its gonna be used by a eggdrop anyways.

will make a file with a list of users in it updating that file every min. bot would need to be in said channel.

Code: [Select]
bind time - * time:mkchanlist
#args in a tcl proc means a unlimited number of arguments put into a tcl list called $args im not gonna use the time 'bind time' gives to proc so this works easier
proc time:mkchanlist {args} {
set chan #chanhere
set list [chanlist $chan]
set users [join $list <br>\n]
set numusers [llength $list]
set filehandle [open userstats.html w]
puts $filehandle "users online in $chan: (${numusers})<br>\n$users"
close $filehandle
should spit out a file called userstats.html and it should look like:
Code: [Select]
users online in #chat (5)
user1
user2
user3
user4
user5
Title: Re: Channel Statistics Module
Post by: BlackDragon on October 14, 2010, 01:21:40 AM
sorry for posting on a dead topic... but i liked it and what about if i want to have on a web page ONLY the channels of my network ?