Silo Posted October 16, 2008 Report Share Posted October 16, 2008 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 More sharing options...
Guest X-Fusion Posted October 16, 2008 Report Share Posted October 16, 2008 $duration(%bt,2) You make it way to complicated. If you do $duration(%bt,3), it'll return it in h:m:s format. Link to comment Share on other sites More sharing options...
Silo Posted October 16, 2008 Author Report Share Posted October 16, 2008 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 Cheers, mate Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now