mIRC Home    About    Download    Register    News    Help

Print Thread
#114326 13/03/05 06:25 PM
W
Wishie
Wishie
W
You see, I have a problem with my latest script. It goes like this:

Code:
alias nomsg {
  if ( $1 != on && $1 != off && $1 != status ) {
    echo $active *** Syntax error (value must be on, off or status)
  }
  if ( $1 == on ) {
    echo $active *** Not accepting messages..
    set %nomsgstatus on
  }
  if ( $1 == off ) {
    echo $active *** Accepting messages..
    set %nomsgstatus off
  }
  if ( $1 == status ) {
    if ( %nomsgstatus = on ) {
      echo $active *** /nomsg status: on
    }
    if ( %nomsgstatus = off ) {
      echo $active *** /nomsg status: off
    }
  }
}
on *:text:*:?: {
  if ( %nomsgstatus == on ) {
    msg $nick Sorry, not accepting messages at the moment..
  }
}

And this works perfectly well. However, I would like to add another twist to it. When you have it turned on, you shouldn't see what people tell you in pm's, and they should still get that message. Is this even possible?

Regards,
Wishie

#114327 13/03/05 06:28 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Code:
on ^*:open:?: {
  if ( %nomsgstatus == on ) {
    msg $nick Sorry, not accepting messages at the moment..
    halt
  }
}

#114328 13/03/05 06:33 PM
W
Wishie
Wishie
W
Where should I put that? Instead of
Code:
on *:text:*:?: {
  if ( %nomsgstatus == on ) {
    msg $nick Sorry, not accepting messages at the moment..
  }
}

.. that?

#114329 13/03/05 06:34 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Yes. smile

#114330 13/03/05 06:36 PM
W
Wishie
Wishie
W
Great! laugh Thanks a lot tidy_trax!

#114331 13/03/05 06:48 PM
W
Wishie
Wishie
W
Oh ehm, may I ask what the ^ in front of the * in..
Code:
on ^*:open:?:

.. does? smile

#114332 13/03/05 06:52 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
That's explained in the help file: /help halting default text

#114333 13/03/05 07:06 PM
W
Wishie
Wishie
W
Alright, I seem to have a problem. When people pm me, they don't get the message (Sorry, not accepting messages at the moment..).

And I don't get their message either (this is the way it is supposed to be), so that's good.

However, I do get this in my active window:
Code:
[20:02:27] .:: [msg: Jotex] Sorry, not accepting messages at the moment..

So it does message them, but they don't seem to be recieving it. Any ideas? crazy

#114334 13/03/05 07:14 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Have you tried it with more than one person? Maybe they have you on their ignore list or have a script that's interfering.

#114335 13/03/05 07:19 PM
W
Wishie
Wishie
W
Oh, thanks again. I tried it with a clean copy of mIRC, and it works perfectly well. Thanks again tidy_trax! grin


Link Copied to Clipboard