mIRC Home    About    Download    Register    News    Help

Print Thread
#85118 03/06/04 04:06 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
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.

#85119 03/06/04 04:17 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
$dur($calc($asctime($5))) $+ what are you $calculating?

#85120 03/06/04 04:23 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
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

#85121 03/06/04 04:28 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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.

Last edited by Zyzzyx26; 03/06/04 04:29 PM.
#85122 03/06/04 04:29 PM
I
Iori
Iori
I
$duration($calc($ctime - $5))

#85123 03/06/04 04:31 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Change the $asctime for what Iori posted smile

I misread the question. :P

#85124 03/06/04 04:33 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Mar 2003
Posts: 160
--- [bans] [*!*@tynsaypapszm] [yewn1x] [-987secs]
that's about 10 secs after typing //mode #blah +b

#85125 03/06/04 04:37 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I tested them here. Both with $asctime and $duration worked fine.

#85126 03/06/04 04:45 PM
I
Iori
Iori
I
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)) $+ ]]

#85127 03/06/04 04:49 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
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 crazy

#85128 03/06/04 04:53 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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.

#85129 03/06/04 04:58 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
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

#85130 03/06/04 05:02 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh, could be.. I'm not an IRCd/Server expert though :P

Good luck smile

Zyzzyx.

#85131 03/06/04 05:04 PM
I
Iori
Iori
I
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.

#85132 03/06/04 05:08 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Mar 2003
Posts: 160
10:23:10 AM Pacific Standard Time

frown

Last edited by Marantz; 03/06/04 05:11 PM.
#85133 03/06/04 05:22 PM
I
Iori
Iori
I
Err; I meant for you to compare that result against a known (reasonably) accurate time. smile

#85134 03/06/04 05:40 PM
Joined: Mar 2003
Posts: 160
M
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
M
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 crazy

#85135 03/06/04 05:59 PM
I
Iori
Iori
I
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....


Link Copied to Clipboard