24hr Time

By LucSatise on Mar 17, 2008

This is just a simple snippet that will return 24hr time when $24Hr is used in a script.

I know its realy basic but some ppl asked for this on a server so i decided to post it.

alias 24Hr {
  if ($Asctime(HH) == 00) || ($asctime(HH) == 12) { return 12: $+ $asctime(nntt) }
  elseif ($Asctime(HH) < 12) && ($asctime(HH) != 00) { return $asctime(HH:nntt) }
  elseif ($Asctime(HH) > 12) { return $calc($ASCTIME(HH) - 12) $+ : $+ $asctime(nntt) }
}

Comments

Sign in to comment.
a104375   -  Oct 28, 2008

Very nice snippet! Anyway would it be possible for someone to create one of these for a ctcp response where it takes the users replied time and converts it to 12hr rather than 24hr this is what I've done so far.
Currently most peoples ctcp replies are in 24hr and I would like it to do 12hr but haven't been able to figure it out.

on :TEXT:`time:#: {
if ($2 == $null) { notice $nick enter a user | halt }
if ($2 !ison $chan) { notice $nick that user isnt here | halt }
else {
ctcp $2- time
set %timecheck $true
set %timechan $chan
}
}
on :CTCPREPLY:TIME: {
if (%timecheck) {
msg %timechan Time For $nick Is $2- $+.
unset %timecheck
unset %timechan
}
}

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.