Jump to content

$calc Question


Silo

Recommended Posts

Guys & Dolls, I know I know, you all fret if I don't post a question every week... so without further aidue, my question is thus:

 

[Banned for $int($calc(%bt / 60) * 100)) $iif(%bt <= 60,minute,minutes) $+ ]

 

and the %var for %bt is via:

var %bt = $input(Enter ban time in seconds,qend,Duration) | ban -u $+ %bt $address($$1,3)

 

The first code (as well as the second) is quite obvious. I enter a ban time in seconds - say 300 seconds. After the kick it messages it's calculated into minutes.

 

Obviously, if the time exceeds 60 minutes we're into the hours. Can someone show me how to make it go into hours?

 

Would I need to $calc the first calculation in a similar fashion?

 

If anyone can shed some light on the subject, I'd love to hear it.

 

Thank you in advance :)

Link to comment
Share on other sites

Ahhhh, ok thanks, X... And I thought I was being pretty clever, too! Sad to say, I'm sure I quite often do do things the hard way.

 

I said do do :oops:

 

Cheers, mate :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...