1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# This will put the current time, date, etc according to your server
# in the appropriate variables
alias servertime {
stack push on 391
^on ^391 * {
@ day = [$2]
@ month = [$3]
@ date = [$4]
@ time = [$7]
}
time
wait
stack pop on 391
}
# This will get the time from the uptime program and put it in the
# variable uptime
on ^exec "uptime *" {
@ uptime = [$1]
}
on ^exec_exit "uptime"
alias uptime {
exec -name uptime uptime
wait %uptime
}
# This will get the time, date, etc from the date program and
# put them in the appropriate variables.
on ^exec "date % % % *" {
@ day = [$1]
@ month = [$2]
@ date = [$3]
@ time = [$4]
}
on ^exec_exit "date"
alias datetime {
exec -name date date
wait %date
}
#modernized by hop'95
|