mIRC Homepage
Posted By: Dertikter QUIT event, suppressing message - 03/01/11 06:17 AM
Hi there,

Been working on a small script and I have run in to a small corner, I can see a way around my issue but was wondering if there was an easier way to do it.

Basically, I have a script which suppresses event messages for selected channels to filter out event spam and focus on the chat messages. Using a while loop and $comchan, I have included the QUIT event in this and it is indeed suppressing the quit message.

However, I only wanted the QUIT event message to be suppressed on the channel which has this variable set and to show on the other channels which I share with the quitting user.

Quick example: I am UserA and am on ChanA and ChanB. I have set this variable to true on ChanB. UserB joins both ChanA and ChanB, I see a JOIN event on ChanA but the ChanB message is suppressed as expected. UserB then quits IRC, triggering the QUIT event suppression from ChanB, but the message is also suppressed in ChanA which I would like it to be shown, keeping ChanB's message suppressed.

Now, the way I thought to get around this was to halt the default event trigger and echo my own messages in all the channels without this variable set and skipping over the channels with it set to true. I am also aware that mIRC itself can set what to do with events on specific channels by right clicking on them, but I wanted to do this via script.

Is there an easier way around this that I have overlooked somewhere or must I make it echo my own messages, skipping the necessary channels?

I have had little sleep and am not proof reading this, so it may seem long-winded or ambiguous. Let me know if you need clarification on anything.

Thanks.
Posted By: 5618 Re: QUIT event, suppressing message - 03/01/11 06:46 AM
If we forget your script for a moment, then channel-specific events can be dealt with via right-clicking the channel button/name and selecting Events...
Posted By: Dertikter Re: QUIT event, suppressing message - 03/01/11 07:29 AM
Originally Posted By: Dertikter
I am also aware that mIRC itself can set what to do with events on specific channels by right clicking on them, but I wanted to do this via script.

I really would like the script to handle it if possible.

Thanks.
Posted By: RusselB Re: QUIT event, suppressing message - 03/01/11 08:17 AM
Regretfully I'm unable to think of another way of doing this in a manner where only you will see the message(s). The other alternatives I considered would end up posting the message to the full channel, which I can see being undesirable, or only having it show in one channel, not necessarily the channel you want it to be shown in.
Posted By: Dertikter Re: QUIT event, suppressing message - 03/01/11 08:29 AM
That is pretty much all I got out of it too, ah well, thanks for the help anyway. smile
Posted By: DJ_Sol Re: QUIT event, suppressing message - 04/01/11 06:54 AM
You could connect to the server using a socket and have a lot more control over the incoming events. But that's not an efficient solution to your issue.
© mIRC Discussion Forums