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 request if possible

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


Joined: 02 Feb 2006
Posts: 29

PostPosted: Wed Apr 12, 2006 6:59 am    Post subject: script request if possible Reply with quote

Hello. I want to request a tcl script if possible.
I want a script to log all the public commands ex ( ! . ) in my channel when a user give a command !blabla or .blabla to log it in a txt and if its possible ( if ) to sent it in a specific email.

Thank u.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 12, 2006 12:00 pm    Post subject: Reply with quote

This will place public commands starting with "!" or "." in the bot's log file (also shows on partyline with the correct console flags).

Code:

bind pubm - "% !*" cmd:log
bind pubm - "% .*" cmd:log

proc cmd:log {n u h c t} {
        putlog "Public Command Logger: $t used by $n in $c"
}
Back to top
View user's profile Send private message
kitsaras
Voice


Joined: 02 Feb 2006
Posts: 29

PostPosted: Wed Apr 12, 2006 2:38 pm    Post subject: Reply with quote

DragnLord wrote:
This will place public commands starting with "!" or "." in the bot's log file (also shows on partyline with the correct console flags).

Code:

bind pubm - "% !*" cmd:log
bind pubm - "% .*" cmd:log

proc cmd:log {n u h c t} {
        putlog "Public Command Logger: $t used by $n in $c"
}



Works fine i check it but is there any way to change the log dir ex /home/blabla/public_html/bot.log ?

thank u.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Apr 12, 2006 3:00 pm    Post subject: Reply with quote

Code:

set logfile "/home/blabla/public_html/bot.log"
bind pubm - "% !*" cmd:log
bind pubm - "% .*" cmd:log

proc cmd:log {n u h c t} {
        set cmdlog [open ${::logfile} a+]
        set timestamp [clock format [clock seconds]]
        puts $cmdlog "\[$timestamp\] $t used by $n in $c"
        close $cmdlog
}


This should be what you're looking for.
Back to top
View user's profile Send private message
kitsaras
Voice


Joined: 02 Feb 2006
Posts: 29

PostPosted: Wed Apr 12, 2006 5:55 pm    Post subject: Reply with quote

DragnLord wrote:
Code:

set logfile "/home/blabla/public_html/bot.log"
bind pubm - "% !*" cmd:log
bind pubm - "% .*" cmd:log

proc cmd:log {n u h c t} {
        set cmdlog [open ${::logfile} a+]
        set timestamp [clock format [clock seconds]]
        puts $cmdlog "\[$timestamp\] $t used by $n in $c"
        close $cmdlog
}


This should be what you're looking for.


I just change the logfile from config to the public_html and works fine
Very Happy thank u very much DragnLord
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