WebStats script for dch++
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
WebStats script for dch++
Gadget's WebStats script for nmdch ported to dch++ by me. With a few small changes.
You can get it here:
http://members.lycos.co.uk/qqzm/dchpp/
And see some sample output here:
http://members.lycos.co.uk/qqzm/tveps/
You can get it here:
http://members.lycos.co.uk/qqzm/dchpp/
And see some sample output here:
http://members.lycos.co.uk/qqzm/tveps/
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
Looks cool, but ftp upload doesnt seem to work nor can I see my local stat file thats generated. Here is what ftplog.txt has:
Code: Select all
ftp> ftp> open upload.attbi.com
Invalid command.
ftp> username
Invalid command.
ftp> password
Not connected.
ftp> ascii
Not connected.
ftp> put "stats.htm" "stats.html"
quit
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
Hmmm, not sure why ftp uploading isn't working for you, I have no problem with it. As for not seeing the local file, if you have ftp upload turned on the local file is deleted after being uploaded. Try switching ftp upload off and see if the file is created ok. If so it may be a problem with your ftp settings.
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
Yeah, I guess some docs would be helpful. I was being a tad lazy.
Ok, quick set-up guide...
1) Copy WebStats.lua and template.htm to you dchpp\Scripts directory.
2) Edit your LuaScripts.xml file to include WebStats.lua.
3) Copy the images1 directory to your web server directory or upload to your ftp site.
4) Edit the config section of your WebStats.lua file (explained below) to suit your setup.
5) Reload your lua scripts and all should be working fine.
Config Section: (I've uploaded a new version which groups all the settings together at the top. In the original this was split up a bit.)
Ok, quick set-up guide...
1) Copy WebStats.lua and template.htm to you dchpp\Scripts directory.
2) Edit your LuaScripts.xml file to include WebStats.lua.
3) Copy the images1 directory to your web server directory or upload to your ftp site.
4) Edit the config section of your WebStats.lua file (explained below) to suit your setup.
5) Reload your lua scripts and all should be working fine.
Config Section: (I've uploaded a new version which groups all the settings together at the top. In the original this was split up a bit.)
Code: Select all
-- ==============================
-- User Settings.
-- ==============================
iUpdateInterval = 600
Time in seconds between each update.
iChatLines = 25
Number of lines of chat to show.
sTemplateFile = "Scripts/template.htm"
Path (relative to the root of dchpp) to your template file. (You shouldn't need to change this)
sOutputFile = "index.htm"
The path to output the stats html file to. Note: If using ftp upload this file will be removed after being uploaded).
sSettingsFile = "Scripts/StatSettings.txt"
Path to the file where the script stores its settings. (You shouldn't need to change this)
sRulesFile = "texts/rules"
Path to the file containing your hub rules.
bUseFtp = 0
Set to 1 to use ftp upload, 0 otherwise.
sFtpBatchFile = "Ftp.scp"
(You shouldn't need to change this)
sFtpLogFile = "Scripts/FtpLog.txt"
Path to the ftp log file.
sFtpAddress = "myftpsite.com"
Address of your ftp server.
sFtpFilename = "index.html"
Remote filename for the stats file.
sFtpUsername = "username"
sFtpPassword = "password"
Your ftp login details.
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
Well after I started to look into why ftp wasnt working, I realized the hub the computer was running on, couldnt even talk to my ftp site for whatever odd reason. Anyways, now I got it working...
http://bsod2600.home.attbi.com/stats.htm
http://bsod2600.home.attbi.com/stats.htm
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
In the next version, could you add an option to include/not include the /text/rules file. In my welcome message, I already put the hub rules, so reading the text/rules file is just redundant.
Also, I was noticeing the script doesnt read access.xml for the user levels/descriptions. Think that would be possbile too?
Also, I was noticeing the script doesnt read access.xml for the user levels/descriptions. Think that would be possbile too?
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
BSOD2600 wrote:Reliability 100.61 %
I'm not too surprised given that the downtime is used to calculate the reliability. I can't seem to find any reason why your downtime is screwed, it doesn't seem to want to do it for me
BSOD2600 wrote:In the next version, could you add an option to include/not include the /text/rules file. In my welcome message, I already put the hub rules, so reading the text/rules file is just redundant.
You could just set sRulesFile to "".
BSOD2600 wrote:Also, I was noticeing the script doesnt read access.xml for the user levels/descriptions. Think that would be possbile too?
Yeah, this is something I was already planning to do when I get around to it
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
nice work qqzm! =)
looking good this..
looking good this..
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
-
yakko
- Posts: 258
- Joined: 2003-01-27 06:04
I just installed it. Can you make it pick up DCH++'s userlevels? I have unregistered, registered, op, and admin as my levels, and my ops show up as VIPs. My rules also show up twice.
Also, the images1 directory is not in the archive. I grabbed it from the 1.1 one.
Other than those things it looks pretty sweet!
Also, the images1 directory is not in the archive. I grabbed it from the 1.1 one.
Other than those things it looks pretty sweet!
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
yakko wrote:Can you make it pick up DCH++'s userlevels? I have unregistered, registered, op, and admin as my levels, and my ops show up as VIPs.
I have my levels set as they show on the page. The titles are just in the html page, so editing the template file to replace them with your own will sort this. I'm planning to parse access.xml in a later version...haven't quite got around to it yet...
yakko wrote:My rules also show up twice.
Set your rules file to "" instead of "texts/rules". It shows your welcome message and then your rules, so if you have the rules in the welcome message you'll get them twice.
yakko wrote:Also, the images1 directory is not in the archive. I grabbed it from the 1.1 one.
D'oh. Quite stupid of me...I'll go upload a new version with the images directory in there !
-
yakko
- Posts: 258
- Joined: 2003-01-27 06:04
qqzm wrote:yakko wrote:My rules also show up twice.
Set your rules file to "" instead of "texts/rules". It shows your welcome message and then your rules, so if you have the rules in the welcome message you'll get them twice.
Thanks! That fixed it. What determines how many users are shown? I don't see even half my users in the list.
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
bad bad qqzm ;)
hardcoding "output/"...
and I was wondering where my per-user-stats went =)
well.. looking good, I think :)
hardcoding "output/"...
and I was wondering where my per-user-stats went =)
well.. looking good, I think :)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
yakko wrote:PM sent. BTW, I just modified the template and replaced it in the dchpp/scripts directory and it hasn't updated even after restarting the script. Is that the wrong place?
The scripts directory is where it was stored until version 0.2 when I moved it into scripts/WebStats/.
The one in the scripts folder must be left from a previous version
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
Well I finally got around to installing 0.21 and LOVE the new userstats!! one big problem though...my ISP (comcast) apparently doesnt allow any non text characters on their ftp and thus about 75% of the user names aren't allowed. For example:
Yea, I suppose I could setup a webserver on my DC server (although I dont wanna since its got an underpowered cpu). Another alternative is a free webhosting site w/o popups (havn't looked around yet, but got any suggestions?).
Last option would to have an setting in the script that turned on "strict usernames" that would either 1)not create a username html file for any user with not allowed characters or 2) have the script change the generated username files and post the modified one to the client at logon.
Whatcha think?
550-The path or filename you have entered contains forbidden characters.
550-A filename may contain only alphabetic letters in capitals (A-Z) or lower
550-case (a-z) and the numbers 0-9. The symbols dash (-), underscore (_) and
550-dot (.) may also be used. A filename may NOT start with a dot or dash.
550 Orion'sBelt.html: Forbidden filename
Yea, I suppose I could setup a webserver on my DC server (although I dont wanna since its got an underpowered cpu). Another alternative is a free webhosting site w/o popups (havn't looked around yet, but got any suggestions?).
Last option would to have an setting in the script that turned on "strict usernames" that would either 1)not create a username html file for any user with not allowed characters or 2) have the script change the generated username files and post the modified one to the client at logon.
Whatcha think?
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
-
qqzm
- Posts: 47
- Joined: 2003-01-23 12:08
The start info is saved to disk once every so often as specified in your settings. It is also saved when the hub is shutdown properly. If the hub crashes under it, it doesn't get chance to save it's data so will only have the data since the last update.
About the usernames - I'll have a look at replacing such characters with _ in the next release.
About the usernames - I'll have a look at replacing such characters with _ in the next release.
-
Sedulus
- Forum Moderator
- Posts: 687
- Joined: 2003-01-04 14:32
perhaps you could hash the usernames,
I don't know if that would be too cpu intensive.
unfortunately the math library doesn't include an md5 function,
and windows systems do not support popen() (otherwise you could use the md5sum program for it)
I don't know if that would be too cpu intensive.
unfortunately the math library doesn't include an md5 function,
and windows systems do not support popen() (otherwise you could use the md5sum program for it)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
BUG
It seems occasionally, the webstats 0.21 gets the first and last seen reversed. For example: http://bsod2600.home.comcast.net/dch/gatorj23.html
Just in case it gets updated before you look at it:
Just in case it gets updated before you look at it:
Shared data 31.36 GB
Access level 0
First seen 11:15:01 2003/09/07
Last seen 13:56:06 2003/09/05
-
BSOD2600
- Forum Moderator
- Posts: 503
- Joined: 2003-01-27 23:47
- Location: USA
one more bug...
http://bsod2600.home.comcast.net/dch/doomsayer.html
I know this user has been around for longer than today (as you can see from his "Words of chat" and I recall seeing him around a while ago. Anyways, the webstats shows he just arrived today, so something is not right.
Any ideas?
http://bsod2600.home.comcast.net/dch/doomsayer.html
I know this user has been around for longer than today (as you can see from his "Words of chat" and I recall seeing him around a while ago. Anyways, the webstats shows he just arrived today, so something is not right.
Any ideas?
Who is online
Users browsing this forum: Google [Bot] and 0 guests