mIRC Homepage
Posted By: Marantz //mode #blah +b - 03/06/04 04:06 PM
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.
Posted By: Zyzzyx26 Re: //mode #blah +b - 03/06/04 04:17 PM
$dur($calc($asctime($5))) $+ what are you $calculating?
Posted By: Marantz Re: //mode #blah +b - 03/06/04 04:23 PM
all i want to know is..
-- [bans] [*!*@tynsaypapszm] [yewn1x] [how long has this ban been set]

ie; set 1hr 2mins ago
Posted By: Zyzzyx26 Re: //mode #blah +b - 03/06/04 04:28 PM
Code:
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 smile

[ and ] wont work as characters there, so use $chr(91) = [
and $chr(93) = ]

Hope it helps,
Zyzzy.
Posted By: Iori Re: //mode #blah +b - 03/06/04 04:29 PM
$duration($calc($ctime - $5))
Posted By: Zyzzyx26 Re: //mode #blah +b - 03/06/04 04:31 PM
Change the $asctime for what Iori posted smile

I misread the question. :P
Posted By: Marantz Re: //mode #blah +b - 03/06/04 04:33 PM
--- [bans] [*!*@tynsaypapszm] [yewn1x] [-987secs]
that's about 10 secs after typing //mode #blah +b
Posted By: Zyzzyx26 Re: //mode #blah +b - 03/06/04 04:37 PM
I tested them here. Both with $asctime and $duration worked fine.
Posted By: Iori Re: //mode #blah +b - 03/06/04 04:45 PM
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)) $+ ]]
Posted By: Marantz Re: //mode #blah +b - 03/06/04 04:49 PM
i'm affraid it doesn't work for me, not quite sure why, just checked it again, and it shows -151 secs crazy
Posted By: Zyzzyx26 Re: //mode #blah +b - 03/06/04 04:53 PM
Code:
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 smile

Dont forget to erase the other code.
Posted By: Marantz Re: //mode #blah +b - 03/06/04 04:58 PM
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
Posted By: Zyzzyx26 Re: //mode #blah +b - 03/06/04 05:02 PM
Oh, could be.. I'm not an IRCd/Server expert though :P

Good luck smile

Zyzzyx.
Posted By: Iori Re: //mode #blah +b - 03/06/04 05:04 PM
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.
Posted By: Marantz Re: //mode #blah +b - 03/06/04 05:08 PM
10:23:10 AM Pacific Standard Time

frown
Posted By: Iori Re: //mode #blah +b - 03/06/04 05:22 PM
Err; I meant for you to compare that result against a known (reasonably) accurate time. smile
Posted By: Marantz Re: //mode #blah +b - 03/06/04 05:40 PM
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 crazy
Posted By: Iori Re: //mode #blah +b - 03/06/04 05:59 PM
Well that definately is odd, you have a parenthesis mismatch and $duration has no .props. laugh Guess if it's working out then all is well....
© mIRC Discussion Forums