mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 30
Z
Zedrick Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: May 2005
Posts: 30
I would like to make a special away message for the time 10pm to 8am

it does not work when it has gone into the morning

how can I make it say the special message when someone /msg me between 10pm to 8am


Code:
IF ( $away == $true ) {
    if $asctime(HH:nn:ss) >= 22:00:00 && $asctime(HH:nn:ss) <= 08:00:00 { 
      ./msg $nick special message 
      halt
    }
    ./msg $nick normal message
  }
}

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
It cant be greater than 10pm AND less than 8am.
It has to be greater than 10pm OR less than 8am.

Code:
IF ($away) {
  if (($asctime(HH:nn:ss) >= 22:00:00) || ($asctime(HH:nn:ss) <= 08:00:00)) { 
    .msg $nick special message 
    } | else {
    .msg $nick normal message
  }
}

* code untested *

Joined: May 2005
Posts: 30
Z
Zedrick Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: May 2005
Posts: 30
Thank You DaveC - it has worked

I copied it from somewhere which they had it on the same day -- it was an on join greet to say Good Morning for the morning and Good Afternoon for the Afternoon


Link Copied to Clipboard