mIRC Homepage
This is somewhere between a possible bug and a feature suggestion. Someone might even be able to explain why or what this is.

Lately I've been receiving "ChanServ has invited nick to #chan" messages in my server status window. I've been on mirc 7.49 since before this started and haven't changed any scripts either. So my guess is it's something new from the network. I tried blocking that message with the on invite event and noticed that the event did not get that message. I then tried using raw invite and that captured it but I am unable to halt it.

Below is a normal invite from another user and then the message from channelserv saying a user joined the +i channel.

pballz inviting me to channel
<- :pballz!pball@pball.tigre.lives.forever INVITE pball :#chan

pballz joining +i channel
<- :ChanServ!service@rizon.net INVITE pballz #chan


This raw event triggers on that message but it doesn't halt it.
raw invite:*: if ($2 = #chan) { echo -a yay | haltdef }


So this could be a bug since mirc isn't picking up that invite message with the on invite event and it's not allowing it to be halted in the raw event either. Or it could be a feature suggestion if this is something new and previously unaccounted for.
I don't experience the problem you're describing, at least not on the current version of mIRC, 7.52

The On Invite event works whether or not it contains a colon before the channel name, and the default text is haltdef'able.

Also, mIRC never displays INVITE messages that are targeted to some nick that isn't you. The target nickname is different in your two examples (one ends in 'z').

Experiment.

Code:
On ^*:INVITE:#: {
  echo -s INVITED: $nick , $target , $chan
  haltdef
}


Code:
/parseline -itqp :pballz!pball@pball.tigre.lives.forever INVITE pball :#chan

/parseline -itqp :ChanServ!service@rizon.net INVITE pballz #chan

//parseline -itqp :ChanServ!service@rizon.net INVITE $me #chan


You may have a custom theme script that makes On Invite messages pretty, and you forgot to turn it off.
I just fired up a clean copy of 7.52, joined a +i channel on Rizon, and then had another person do "/cs invite #channel" and then chanserv sends the two following messages to myself.

<- :ChanServ!service@rizon.net NOTICE me :ChanServ is inviting othernick to #channel.
<- :ChanServ!service@rizon.net INVITE othernick #channel

This only seems to be happening on Rizon as far as my testing goes.

The on invite code you have in your post does not catch the second line above and mirc displays it as "ChanServ has invited othernick to #channel"
Then everything is fine, good, and right with the world.

You see the NOTICE from ChanServ, as you should.

You do not see the somebody-else's INVITE, because mIRC doesn't normally display them. Which seems to be the behavior you desire, too.

If you want to hide the NOTICE coming from ChanServ, then you will have to haltdef the On Notice event.

I don't understand why my On Invite code doesn't trigger for you, because it does trigger for me. But it seems moot at this point, because you don't want to see anything anyway.
© mIRC Discussion Forums