mIRC Homepage
Posted By: Daveoh mIRC sends double MODE if opped - 07/04/10 06:22 PM
I'm using mIRC on Win7 x64.
If you join a channel, mIRC sends a MODE request. If you are opped on that channel before receiving the MODE reply, it sends another one.
I have this happen to me when I join lots of channels which I have op in via a network bot, which then results in this:
Code:
-
* Flood protection: 4 message(s) in queue
-
* Flood protection: 14 message(s) in queue
-

Without flood protection I presume I would be disconnected from the server. This is not good. Does mIRC really need to send another MODE request?
Posted By: Khaled Re: mIRC sends double MODE if opped - 07/04/10 08:52 PM
Yes, that is the correct behaviour. When you join a channel, a mode is sent to retrieve your mode settings. If you are then opped some time later, another mode needs to be sent to update your mode settings, since ops can have access to other settings.
Posted By: Sat Re: mIRC sends double MODE if opped - 07/04/10 10:05 PM
mIRC need not send another MODE request when the reply to the first one has not yet arrived, though..
Posted By: Daveoh Re: mIRC sends double MODE if opped - 07/04/10 10:08 PM
I thought I posted this in "Bug Reports," apparently not.

You say that it sends another "since ops can have access to other settings" however mine doesn't send another one if I am opped after receiving the initial MODE reply.
Posted By: Riamus2 Re: mIRC sends double MODE if opped - 07/04/10 11:07 PM
It would have to or you wouldn't see a key.
Posted By: Daveoh Re: mIRC sends double MODE if opped - 07/04/10 11:19 PM
On chans without a key, then.
Posted By: Riamus2 Re: mIRC sends double MODE if opped - 07/04/10 11:29 PM
There are other modes as well that aren't available except for ops. That was just an example. As Khaled said, you need both. If you're having issues with it, don't join so many channels all at once.
Posted By: Khaled Re: mIRC sends double MODE if opped - 08/04/10 08:11 AM
After looking through my code: mIRC may or may not send a mode when you are opped depending on a combination of the IRC network you are on, the type of channel, the type of op, and whether you have received a reply to a previous mode.

mIRC tracks how many channel modes are sent/received (this is the type of "state" that I would rather avoid tracking, since servers can sometimes send events like this without mIRC making a request, which results in internal tracking being thrown off leading to incorrect behaviors) and there is a check that prevents a second mode from being sent in this specific situation (which is not surprising since this issue has been commented on over the years many times), however the check has been commented out with a note that it caused problems on some networks. So it looks like it was implemented and then later removed.

My guess is that I could have made it behave that way only on specific networks, however the situation was not clear and I decided to err on the side of caution and disabled it completely.
Posted By: drum Re: mIRC sends double MODE if opped - 08/04/10 04:38 PM
I think the current behavior is fine.

If there needs to be a change, my personal recommendation would be to delay the initial MODE request by 1-2 seconds in case you get opped within that time frame.

How do other popular IRC clients handle this?
© mIRC Discussion Forums