mIRC Home    About    Download    Register    News    Help

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

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


"All we are saying is give peace a chance" -- John Lennon
Re: //mode #blah +b #85120 03/06/04 04:23 PM
Joined: Mar 2003
Posts: 160
Marantz Offline OP
Vogon poet
OP Offline
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

Re: //mode #blah +b #85121 03/06/04 04:28 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
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.

"All we are saying is give peace a chance" -- John Lennon
Re: //mode #blah +b #85122 03/06/04 04:29 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
$duration($calc($ctime - $5))

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

I misread the question. :P


"All we are saying is give peace a chance" -- John Lennon
Re: //mode #blah +b #85124 03/06/04 04:33 PM
Joined: Mar 2003
Posts: 160
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2003
Posts: 160
--- [bans] [*!*@tynsaypapszm] [yewn1x] [-987secs]
that's about 10 secs after typing //mode #blah +b

Re: //mode #blah +b #85125 03/06/04 04:37 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
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
Re: //mode #blah +b #85126 03/06/04 04:45 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
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)) $+ ]]

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

Re: //mode #blah +b #85128 03/06/04 04:53 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
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.


"All we are saying is give peace a chance" -- John Lennon
Re: //mode #blah +b #85129 03/06/04 04:58 PM
Joined: Mar 2003
Posts: 160
Marantz Offline OP
Vogon poet
OP Offline
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

Re: //mode #blah +b #85130 03/06/04 05:02 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
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.


"All we are saying is give peace a chance" -- John Lennon
Re: //mode #blah +b #85131 03/06/04 05:04 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
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.

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

frown

Last edited by Marantz; 03/06/04 05:11 PM.
Re: //mode #blah +b #85133 03/06/04 05:22 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Err; I meant for you to compare that result against a known (reasonably) accurate time. smile

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

Re: //mode #blah +b #85135 03/06/04 05:59 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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....