PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: BlazeXxX on 03 January, 2004, 13:42:50

Title: Small Script for New Webstats!
Post by: BlazeXxX on 03 January, 2004, 13:42:50
Hi guys,
I am working on a New Webstats for one of your favourite Robocop! I am basically needing this to carry on with developing webstats:

I want a small script that writes anydata , like ban or connecting user's ip into WEBSTATS directory. Since PtokaX builtin webserver reads Webstats dir only, i am needing the script to write to the webstats dir as well as script dir..

So lets say we got Bans.txt in /scripts/txt/ directory. When it writes to the txt directory, i want it to write to the webstats dir as well at the same time..

Can someone make me any script that does smilar function?

A Simple Kickcounter, or a Ban log or a connecting user's ip or nick.. or anything basically..

If someone can do it, i can gladly provide good webstats in PHP and other language for those big script packages out here..

Thx in advanced to those brainy peepz ;)
Title:
Post by: WooshMan on 03 January, 2004, 19:10:56
Hi BlazeXxX,

I have been working on a similar thing in cgi for Channelbot.

I have modified channelbot to write to the webstats folder at the same time as it writes to it's own file although 80% works so far.

I do think though that a seperate small script (if small is the right word) would be a better option as it can then be used by any hub / webmaster regardless of bot used.

I know that the following files for my cgi script would be needed:

RegisteredUsers.dat
PermBan.dat
tempban.lst
online.lst

Although there may be more that could be used for hub/webstats.

I hope you don't think I am treading on your toes BlazeXxX, because no compitition is intended.

If someone is willing to write a script, I will be most greatful as lua is out of my league at the moment.

Once completed, the cgi (multihub version) will be released for use by others.

Thanks in advance

WooshMan
landofkaraoke.ath.cx
//www.landofkaraoke.ath.cx
Title:
Post by: BlazeXxX on 04 January, 2004, 03:45:57
Thats great to hear ;) nope not at all ! I am happy that there is going to be a good future for ptokax and lua :)

Maybe i cud see ur ideas and pick it up from there... It will be possible in future to make things much easier for the hub owners to modify in those webstats..

Please give me if u have any sample file of how to write to the Webstats dir.. But i heard that the new Ptokax have blocked access to other dir than /scripts? or is it wrong?
Title:
Post by: plop on 05 January, 2004, 04:25:52
by using ../ you can step back a directory or just use absolute paths.
when i was starting on my webstats the hub was running on another computer then the webserver, even that worked fine by me.
just i'm using apache with a lua mod and a.i. builds the webstats.

plop
Title:
Post by: BlazeXxX on 05 January, 2004, 10:46:48
Cool plop  :D  Will give it a try ;)
Title:
Post by: Event_Horizon on 05 January, 2004, 12:11:00
hmmm. sounds not bad...

is it also possible to use that script without knowlege of cgi, cause i don't know cgi.

I would like to show hubstats on my site but i just know some HTML..... if it's possible to modify or create one 4 both would be nice...

THX ahead
Title:
Post by: BlazeXxX on 05 January, 2004, 19:19:58
It will be purely basic to use event horizon :) I am working on PHP version and all u gotta do is just run the webserver :)

I will post how to guide wen its all working.
Title:
Post by: WooshMan on 05 January, 2004, 20:22:13
Ok that is well and good, but we are loosing the thread a little.

Could someone please write a standalone lua which will create files for use with webstats?

There are several hub bots that will create the files with the needed information, but can someone please write a slandalone one?

Sorry to sound pushy or impatient, but that was the request to start off with.

How we get the information from the files once they are there is a different matter really, but a script to make the files in the first place will be a 95% step forwards.

Like I said, sorry to sound pushy, no offence intended.

WooshMan
Title:
Post by: BlazeXxX on 06 January, 2004, 00:33:15
I was abt to say that lool :) If someone gives me a standalone script that writes any kind of data to a .txt file in webstats dir, it will be much appriciatable.

We can den start developing from there, which is much faster.

So cud someone write a standalone bot that writes any sort of data in a txt file in webstats dir at the same time while its writing in scripts/ dir for the hub to use?

So two identical txt files written at same time but in two locations.

One = /webstats/
Second = /scripts/

Thanks to the fast request completing person (plop) !
Title:
Post by: plop on 06 January, 2004, 01:34:07
QuoteOriginally posted by BlazeXxX
I was abt to say that lool :) If someone gives me a standalone script that writes any kind of data to a .txt file in webstats dir, it will be much appriciatable.

We can den start developing from there, which is much faster.

So cud someone write a standalone bot that writes any sort of data in a txt file in webstats dir at the same time while its writing in scripts/ dir for the hub to use?

So two identical txt files written at same time but in two locations.

One = /webstats/
Second = /scripts/

Thanks to the fast request completing person (plop) !
1 place 2 save 2 is more then enough.
the more places you save 2 the more likely it's gone be complex or hard 2 use.
wooshman pm-ed me about this and i invited him over 2 my hub so i'll invite you 2. lol
then we can see what can be stripped from a.i. and what has 2 be changed, should be the easyest and the fastest as i have most of it allready.

plop
Title:
Post by: Event_Horizon on 06 January, 2004, 10:48:24
THX doods.... :D

BlazeXxX I hope U R right ;)

Kepp up your good Work
Title:
Post by: BlazeXxX on 06 January, 2004, 12:43:44
Yup sure plop.
thx Event Horizon
Title:
Post by: WooshMan on 07 January, 2004, 13:09:22
Great minds think alike... "I was about to say that"......lol

Thanks plop for your invite.. I will be there....

Woosh :-)
landofkaraoke.ath.cx