Code: Select all
set adminchan "#adminchan"
bind time - "?0 * * * *" lagbot
proc lagbot { } {
global adminchan
putmsg $adminchan "Bot lag is...... seconds"
}
Code: Select all
set adminchan "#adminchan"
bind time - "?0 * * * *" lagbot
proc lagbot { } {
global adminchan
putmsg $adminchan "Bot lag is...... seconds"
}
Please define "the lag of the bot" for us.juanamores wrote:I need a command to measure the lag of the bot every 10 minutes automatically.
...
Code: Select all
putserv "privmsg NickToPing_here :\001PING [clock milliseconds]\001"
Defined as the time after which the bot will respond to a command from any user (not a specific user).willyw wrote:Please define "the lag of the bot" for us.
I'm thinking that having the bot ping the user, then report the ping response time is what you are wanting. Please tell me, if this is incorrect.juanamores wrote: ...
Defined as the time after which the bot will respond to a command from any user (not a specific user).
I mean, what I need is that the measure Bot its own lag, with respect to any potential user who will use it.
...
I'm just starting to learn TCL, I know very little this it.willyw wrote: I'm thinking that having the bot ping the user, then report the ping response time is what you are wanting. Please tell me, if this is incorrect.
.....
If this is totally new to you, you need to say so now. Your first post included some code, so it appears that you do know some basic tcl already, therefore that is how you will be treated. That will frustrate you, if you know no tcl at all. So, let us know.
Excellent! I hope you continue to learn TCL, and have fun with it.juanamores wrote: ...
I'm just starting to learn TCL, I know very little this it.
You might want to reconsider this. Is it possible that the users would soon get tired of being pinged?One idea might be, a code that ping 5 random users any of the channels where the bot is.
Yes - if you want to learn the basics.Then make an average in seconds responses of the 5 ping and save the result in a variable.
It is possible?
Your English is fine. Don't worry.Sorry for my bad English ...
Code: Select all
putserv "privmsg NickToPing_here :\001PING [clock milliseconds]\001"
Write a proc to correspond to abind ctcr <flags> <keyword> <proc>
proc-name <nick> <user@host> <handle> <dest> <keyword> <text>
Description: just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg)
...and that 'lag' is specific to Only Those 2 Users, and no one else.No one is ever really lagged themselves; they are only lagged to each other.