|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
anyone know why it won't show how long ago the ban was set?
if $numeric == 367 { echo -a $bit [ $+ bans $+ ] [ $+ $3 $+ ] [ $+ $4 $+ ] [ $+ $dur($calc($asctime($5))) $+ ] | halt }
thanks.
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
$dur($calc($asctime($5))) $+ what are you $calculating?
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
all i want to know is.. -- [bans] [*!*@tynsaypapszm] [yewn1x] [how long has this ban been set]
ie; set 1hr 2mins ago
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
raw 367:*: {
echo -a -- [bans] $chr(91) $+ $3 $+ $chr(93) $chr(91) $+ $4 $+ $chr(93) $chr(91) $+ $asctime($5) $+ $chr(93)
halt
}
This should work [ and ] wont work as characters there, so use $chr(91) = [ and $chr(93) = ] Hope it helps, Zyzzy.
Last edited by Zyzzyx26; 03/06/04 04:29 PM.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
$duration($calc($ctime - $5))
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Change the $asctime for what Iori posted I misread the question. :P
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
--- [bans] [*!*@tynsaypapszm] [yewn1x] [-987secs] that's about 10 secs after typing //mode #blah +b
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
I tested them here. Both with $asctime and $duration worked fine.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Instead of all those $chr()s you can use
echo -a -- [bans] $+([,$3,] [,$4,] [,$duration($calc($ctime - $5)),])
echo -a -- [bans] [[ $+ $3 $+ ]] [[ $+ $4 $+ ]] [[ $+ $duration($calc($ctime - $5)) $+ ]]
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
i'm affraid it doesn't work for me, not quite sure why, just checked it again, and it shows -151 secs
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
raw 367:*: {
echo -a -- [bans] $+([,$3,] [,$4,] [,$duration($calc($ctime - $5)),])
halt
} Paste this in your remotes and see if it works. Maybe it was some copying and pasting common mistake Dont forget to erase the other code.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
lol trust me, it doesn't work 1 thing i noticed though, in the channel central it show the ban was set at 5:51pm, yet the time was only 5:47pm soon as it passed 5:51pm, //mode #blah +b show the duration after 5:51 so i'm guessing this could be a server based problem
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 714 |
Oh, could be.. I'm not an IRCd/Server expert though :P Good luck Zyzzyx.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
For sure it is. The server is sending the wrong value, probably it's clock is way out. :tongue: Type /time and see what the server replies with.
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
10:23:10 AM Pacific Standard Time
Last edited by Marantz; 03/06/04 05:11 PM.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Err; I meant for you to compare that result against a known (reasonably) accurate time.
|
|
|
|
Joined: Mar 2003
Posts: 160
Vogon poet
|
OP
Vogon poet
Joined: Mar 2003
Posts: 160 |
Not knocking your replies to my question, but none of them worked. i tried this instead $duration($calc($ctime - $5))).ctime and it works fine
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Well that definately is odd, you have a parenthesis mismatch and $duration has no .props. Guess if it's working out then all is well....
|
|
|
|
|