world2.chat and its behaviours
Hello,
if im right, world2.chat is the file with all the chat in it. Its getting bigger and bigger and bigger because it logs all chat all the time.
First i have a questions. If i just delete it, will logservice create a new one by itself or do i have to make an empty file to kick old logs ?
I made a php script which reads the last 20 lines and decode it. This works just fine ( its very similar to the livechat plugin for pwAdmin ) and when i do a little cosmetic it will be fine for chatting without logging in. Its only the ingame part so no chatting atm, just reading the ingame chat. I know we can inject messages into it but they are always system broadcasts ( dunno how to get it working to write in chat as a player ) and i try to find out how to inject to worldchat or trade chat ( no one uses trade chat so this one whould be perfect as "offline" chat )
Any infos about the File and ways to inject into it whould be great.
Re: world2.chat and its behaviours
Quote:
Originally Posted by
Zorno
Hello,
if im right, world2.chat is the file with all the chat in it. Its getting bigger and bigger and bigger because it logs all chat all the time.
First i have a questions. If i just delete it, will logservice create a new one by itself or do i have to make an empty file to kick old logs ?
I made a php script which reads the last 20 lines and decode it. This works just fine ( its very similar to the livechat plugin for pwAdmin ) and when i do a little cosmetic it will be fine for chatting without logging in. Its only the ingame part so no chatting atm, just reading the ingame chat. I know we can inject messages into it but they are always system broadcasts ( dunno how to get it working to write in chat as a player ) and i try to find out how to inject to worldchat or trade chat ( no one uses trade chat so this one whould be perfect as "offline" chat )
Any infos about the File and ways to inject into it whould be great.
It's a log file...
Not a read and output data file
add this line to your crontab (adjusting paths as needed)
0 0 * * * gzip /PWSever/logservice/world2.chat && echo > /PWServer/logservice/world2.chat
That compresses the current log at midnight and when its done it then erases truncates the file for new data to be added
Re: world2.chat and its behaviours
Quote:
Originally Posted by
das7002
It's a log file...
Not a read and output data file
I know that it is a log file. Mah question was a bit wrong. I want to know how to kickout messages to the server that are not system broadcasts :D:
Quote:
Originally Posted by
das7002
add this line to your crontab (adjusting paths as needed)
0 0 * * * gzip /PWSever/logservice/world2.chat && echo > /PWServer/logservice/world2.chat
That compresses the current log at midnight and when its done it then erases truncates the file for new data to be added
I dont want to have compressed data, i want to thrash the whole data and start a fresh file lol. So i just want to know if it is ok to delete the file or if i have to create an empty file for that. :):
Re: world2.chat and its behaviours
Quote:
Originally Posted by
Zorno
I know that it is a log file. Mah question was a bit wrong. I want to know how to kickout messages to the server that are not system broadcasts :D:
I dont want to have compressed data, i want to thrash the whole data and start a fresh file lol. So i just want to know if it is ok to delete the file or if i have to create an empty file for that. :):
You can empty it... that is what the second part does
Re: world2.chat and its behaviours
Quote:
Originally Posted by
das7002
You can empty it... that is what the second part does
perfect :): Thanks again :):