Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x

[Demande] Uptime.tcl
Hello, what i search for is something like an uptime script for the eggdrop. Basically what i want it to show is the real time since eggdrop was loaded with the script.
Like in this example:
Today is Sunday 20 April 2014 17 hours 00 minutes
After the eggdrop is connected on the network and has joined a channel, it should save the date and time and store them into a file from where to read them later. Then, and only then if the <user> decides to enable the script, it should be able to retrieve from the eggdrop, for how much time the script was loaded. Also it should include an antiflood protection, and the command should be available only in public (in channel).
1. Eggdrop stores the date and time in a file when the script is loaded into it and calculate after how much time passed since the <user> is giving the actual command.
2. <user>: .chanset +uptimebot #channel
3. <user>: !uptimebot
4. <eggdrop>: <user>, the time since i have been monitoring is 1year 2months 3days 1hour 15minutes. <- this should be the time and date passed since when the script was loaded first and the time when the <user> gives the command
<eggdrop>: The first time was on 2013 February 17 at 15 hours and 45 minutes. <- this should be the time and date when the script was loaded for the first time.

If there is another way of storing the original date and time when script is loaded on eggdrop it would be great.
Thank you if someone knows about such a script or if it can be done.

Forum Jump:

Users browsing this thread: 1 Guest(s)