egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script to access logs

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
antiemp
Voice


Joined: 29 Feb 2012
Posts: 2

PostPosted: Wed Feb 29, 2012 11:18 am    Post subject: Script to access logs Reply with quote

If this already exists, please point me in the right direction.

We currently keep all logs for a certain channel. We would like to have those logs accessible by the users. Two things need to happen.

1) Expose logs via http
2) Access logs via bot commands

For 1) we could simply point our http server to the logs folder and serve the files directly. If there are other solutions to this that are better, please advise.

For 2), we would like the following skeleton command:
!logs <date>

The <date> could be precise or fuzzy. Here are some examples:
!logs 2012-01-23
!logs Jan 23
!logs yesterday
!logs 1 week ago

Starting with precise dates should be easier for initial implementation, fuzziness can be added later.

The command would alert the bot, the bot would process the date and return an URL to the appropriate log file via private or public message to the user inputting the command.

If something like this already exists, please advise.

Thank you for your patience in reading this.
Back to top
View user's profile Send private message
antiemp
Voice


Joined: 29 Feb 2012
Posts: 2

PostPosted: Wed Feb 29, 2012 2:50 pm    Post subject: Reply with quote

http://sourceforge.net/projects/logs2html/ seems to handle problem 1)

now just needing to look into problem 2)

also need to add problem 3) which is:
user should be able to request parts of a log to be private messaged

for example:
!logs <date> <last|first> <number>

so if user sends
!logs 2011-01-23 last 5

bot returns the last 5 lines spoken from the log file, with settings for max lines returnable and a default

if default line count is 15, then to get last 15 lines the user would send
!logs 2011-01-23 last

it would be nice to also allow the user to omit the date and have today set as the default
!logs last
would return the last 15 (default) lines of today's log
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber