PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: nand on 04 September, 2004, 03:44:25

Title: ONLY mainchat logging script
Post by: nand on 04 September, 2004, 03:44:25
I need very very simple script to log the chat to txt files best if filenames have date in it like chatlog10.2.04.txt

Chat log would need to log mainchat like:

[2004-08-20 17:13] blah blah

exacly that formating.

I know it is easy so I sould make it, but I would need days or months to learn lua, and for you it would be minute. So please write this for me if you can.
Title:
Post by: NemeziS on 10 September, 2004, 12:36:30
But can this bot log main chat to special dirrectory? For example C:\FTP\Pub?  I tried to change path but the syntax error appears. And it's not good that bot sends messages like that: <------------------------------------------------------------------------[ End of main chat log ]------------------>
I really don't need this...
Could you edit this script for me please? :)
Title:
Post by: Typhoon on 11 September, 2004, 00:14:07
just remove this line

  user:SendPM(botname,"<------------------------------------------------------------------------[ End of main chat log ]------------------>")


Typhoon?
Title:
Post by: ??????Hawk?????? on 11 September, 2004, 04:46:19
heya nand


why not just enable logging   on your client  ????

dc++  settings/logs and sound    

put this in to the format line and tick the relevent logs

[%Y-%m-%d %H:%M] %[message]
Title: Hmmmm...... IDEA!!!
Post by: Janhouse on 16 September, 2004, 21:30:27
Can you add option that shows ip adres?

Ex: [16-09-2004 22:18] (IP) blah blah

-----------------------------------------------

And I don't know how does that loging script works, but it should save chat in log file each hour not when you type message. So it won't make hub slower. (If it is stupid just ignore this part)

-----------------------------------------------

OH!!! And there should be option to open log files vith command !showlog

Date should be in format DD-MM-YYYY
Ex: 16-09.2004

And if dc can't open very large files in bot's pm, script should split log files in many files (in each log file should be writen ex: Type !showlog 16-09-2004p2

(p2 means part2 (there could be part3, part4 etc.))

----------------------------------------------

Masters should have option to delete all log files typing clearlog (and script should delete log files older then 3 days.

----------------------------------------------

It sound's a bit hard but matbe someone can make it.




P.S. Sorry about my bad english!  :D
Title:
Post by: ScidaR on 01 July, 2005, 21:14:16
I changed this script a little bit, and at my hub, when users enters, they can see a 10 line mainchat log. This script logs every line, include the ptokax commands too, and everybody can see if I use for example "!info" on a user.  Could anyone help me to make it to not log that lines which starts with "!" ?
Title:
Post by: ScidaR on 02 July, 2005, 09:58:36
thank You Mutor, it works :)
Title:
Post by: GILLIS on 19 October, 2005, 01:07:28
mutor, is it possible to modify this script to pickup other bot entrys, i see that it doesnt pick up any bot entrys as "history".

that would be useful for my hub. as a bot announces the latest releases hourly. and if somone wasnt online when it last announced they would get it pmed from the history bot :)

thanks.
GILLIS
Title:
Post by: bastya_elvtars on 19 October, 2005, 04:57:33
That can only be done clientside, I am afraid.
Title:
Post by: GILLIS on 19 October, 2005, 12:28:33
ok, all id really need it for is the bots history anyways :)
thanks,

please check out

http://board.univ-angers.fr/thread.php?threadid=5465&boardid=28&styleid=1&sid=b321dc7595b6c63e862ea8dc24bac5e7

thanks again.
GILLIS