|
Joined: May 2005
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: May 2005
Posts: 30 |
On mIRC when you voice devoice and op deop yourself or another user when using the mIRC control function it says:
#channel v * You must specify a parameter for the voice mode. Syntax: <nick>. #channel o * You must specify a parameter for the op mode. Syntax: <nick>.
This happens on InspIRCd 3 but does not happen on InspIRCd 2
mIRC when you are a channel op right click on yourself or another person in the list of users in the channel. Control -> voice / op - to voice and op the user.
And same for devoice / deop
It does give you the voice and op modes and removes them.
When you voice and op using /mode #channel + nick -- it does not get this message.
On InspIRCd they say -- This is a bug in mIRC. It's sending a bunch of extraneous prefix mode changes without any values which is triggering the syntax hint.
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Can you mention a network where this happens? Or, create a @debug monitoring window to see the exact mode command being sent my mirc?
|
|
|
|
Joined: May 2005
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: May 2005
Posts: 30 |
debug:
server.name MODE #channel +vvv nick <- @time=2020-05-02T23:53:53.126Z :server.name 696 nick #channel v * :You must specify a parameter for the voice mode. Syntax: <nick>.
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
That is a bug by the ircd which rejects a command which has been accepted for years. The outbound command comes from the popups.ini command:
.Voice:/mode # +vvv $$1 $2 $3
Since only 1 nick is highlighted, the $2 and $3 are null. The 2nd and 3rd 'v' mode should be ignored in the absence of a 2nd and 3rd nick. To placate an ircd which doesn't accept a voice command which has been valid for decades, the line in popups.ini would need to be replaced with:
.Voice:/mode # + $+ $str(v,$0) $$1 $2 $3
This replacement changes the command to have the v replicated to match the number of nicks following it. You could even replace append $4 $5 $6 depending on how many mode commands can be stacked together at the networks you use.
|
|
|
|
Joined: Dec 2002
Posts: 5,477
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,477 |
Thanks for your bug report.
As maroon pointed out, the commands in the default popup menus in mIRC have been the same for a long time, probably about 20+ years, and have always worked without any issues. They are in almost every copy of mIRC that has ever been installed, so they are very much a core feature.
I can understand why the InspIRCd developers thought this would be a useful change, as it does provide feedback on excess parameters, but it breaks with how all other ircds have always worked, ie. excess parameters are ignored.
I can change the popup commands to use the format suggested by maroon in the next release but this issue would still be present in every existing installation of mIRC going back 20+ years for users on InspIRCd servers.
|
|
|
|
Joined: Feb 2011
Posts: 461
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Feb 2011
Posts: 461 |
|
|
|
|
Joined: May 2010
Posts: 45
Ameglian cow
|
Ameglian cow
Joined: May 2010
Posts: 45 |
Well, you gotta start somewhere. If you are going to change this in the way maroon proposed, then you may as well also want to grab this opportunity to increase the number of parameters up to like for example $6, as some networks accept more than 3 parameters per MODE. So instead of "$$1 $2 $3", make it "$$1 $2 $3 $4 $5 $6". Hell, why not even just "$$1-" and its good forever. .Op:/mode # + $+ $str(o,$0) $$1-
.Deop:/mode # - $+ $str(o,$0) $$1-
.Voice:/mode # + $+ $str(v,$0) $$1-
.Devoice:/mode # - $+ $str(v,$0) $$1- By the way, not only popups.ini has this issue, but aliases.ini as well. /op /mode # + $+ $str(o,$0) $$1-
/dop /mode # - $+ $str(o,$0) $$1-
|
|
|
|
Joined: Dec 2002
Posts: 5,477
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,477 |
Thanks for the github link. Unfortunately, it does not look like this change will be reverted.
For users who upgrade: I could make the next release of mIRC scan all of a user's scripts and popups on startup to the find the six specific lines that contain /mode with +ooo and +vvv, in aliases and popups, and replace them.
However, as aliases and popups are customizable, if a user has made any changes to these lines, the fix cannot be applied. If a user has created any new aliases or popups based on these, using a similar format, the fix cannot be applied.
As these aliases and popups have existed for so long, they are probably also used in many examples on the internet.
I will also have to look through the help and FAQs files as there may be examples in them that need to be updated.
For users who do not upgrade (which will likely apply to many users): the issue will persist.
Although the ircd developer's reply on github states that this is an mIRC issue because mIRC is depending on broken server behaviour, this has actually always been standard ircd behaviour. mIRC was using this command format in 1995, many years before the first version of InspIRCd was released.
This is also not a bug in InspIRCd, so much as an intentional, potentially useful change.
The issue is simply one of consideration and backward compatibility with long-established behaviour.
|
|
|
|
Joined: Dec 2002
Posts: 5,477
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,477 |
f you are going to change this in the way maroon proposed, then you may as well also want to grab this opportunity to increase the number of parameters up to like for example $6, as some networks accept more than 3 parameters per MODE. So instead of "$$1 $2 $3", make it "$$1 $2 $3 $4 $5 $6". Hell, why not even just "$$1-" and its good forever. If I recall correctly, this will break on networks that do not support more than three parameters for /mode. That is the reason it has always been limited to three. To make this work, the numbers of parameters would need to be based on the "MODES" token in the CAP event and would involve a loop to iterate through all of the selected nicks to build multiple /mode requests, eg. if a user tries to op ten nicknames in the nickname list. The aliases and popups were always intended as simple examples to help users learn about IRC and scripting. That said, they have not been updated in a long time. If anyone has any ideas on changing the default aliases and popups to make them more useful and/or elaborate, I'd be open to updating them.
|
|
|
|
Joined: Apr 2004
Posts: 871
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 871 |
[..] and would involve a loop to iterate through all of the selected nicks to build multiple /mode requests, [..] I wouldn't bother with that part. These aliases/popups have always clearly been intended to be basic. People who do heavy-duty channel management have long found more capable scripts as replacement, and that's just fine, I think. Keep in mind that maroon's suggestion also produces more 'v' characters than nicknames when more than three nicknames are selected, which I'm sure will also trigger errors on that "I don't know the difference between de facto standards and bugs" person's ircd. At minimum, it would need something like $min($0,3) instead of just $0, which would be a good opportunity to add $min/$max. FWIW, use of $modespl would end up looking somewhat like this (also assuming the existence of a $min, otherwise $iif can be used): .Voice:/var %count = $min($0,$modespl) | /mode # + $+ $str(v,%count) $$1- [ $+ [ %count ] ] This can be made shorter, but probably not less unreadable?
Saturn, QuakeNet staff
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
For non-scriptors and newbies at it, using the square braces can be beyond their ability to understand them. So even though it's a little bit longer, it can also change from
.Voice:/var %count = $min($0,$modespl) | /mode # + $+ $str(v,%count) $$1- [ $+ [ %count ] ]
to
.Voice:/var %count = $min($0,$modespl) | /mode # + $+ $str(v,%count) $gettok($$1-,1- %count,32)
Also, if aliases.ini is supposed to be basic alias examples, the above alias uses $min, so if $min and $max are not going to be added as basic math $identifiers, they could be added as basic examples for aliases.ini, based on the simple example in... https://forums.mirc.com/ubbthreads.php/topics/42298/re-min-challenge#Post42298
min { return $gettok($sorttok($1-,32,n ),1,32) }
max { return $gettok($sorttok($1-,32,nr),1,32) }
|
|
|
|
Joined: Dec 2002
Posts: 5,477
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 5,477 |
Thanks for the suggested popups.
Not sure how I missed this but... the purpose of numeric 696 is only to report missing mode parameters. All other valid modes in the mode request are still applied. This means that a client can ignore/hide the 696 numeric and everything will continue to work in the same way as on all other ircds, where the standard, long-established behaviour is to not report errors in this context.
I will be changing the next beta so that it ignores/hides this numeric, however it will still trigger a remote event so that scripts can detect it if they want to.
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
It just dawned on me that, maybe it's not a good idea to create a popup having a dependency on an item in aliases.ini, since the give-ops command would stop working if aliases.ini got restored to an older version. The min/max aliases are simple enough that the give-ops command could change $min($0,$modespl) to instead be:
$gettok($sorttok($0 $modespl,32,n ),1,32)
Even if the popups isn't changed, the example aliases in aliases.ini is something that could be updated. The last time they were updated is probably earlier than the last time the favorites list was updated. Yay #windows95
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Just a follow-up for OP's benefit. The aliases and popups in 7.62 are still of the old method which sends 3 modes regardless of the number of nicks used, so here's the complete list of current default items and the updates which would be compatible with the new IRCD's sending the error message from a count mismatch. If you don't want to retain the current max of 3 nicks, so you can set as many modes as permitted by the server, simply remove the ",3" from those $min commands below. These changes assume either using 7.62+ or a client containing the 'min' and max' aliases posted above. Fixes for aliases.ini accessed in the Alt+D editor: now:
/op /mode # +ooo $$1 $2 $3
/dop /mode # -ooo $$1 $2 $3
new:
/op /var %count = $min($0,$modespl,3) | /mode # + $+ $str(o,%count) $gettok($$1-,1- %count,32)
/dop /var %count = $min($0,$modespl,3) | /mode # - $+ $str(o,%count) $gettok($$1-,1- %count,32)
Fixes for popups.ini accessed in the Alt+P editor where you select 'Nick List' from the editor's 'view' menu: now:
.Op:/mode # +ooo $$1 $2 $3
.Deop:/mode # -ooo $$1 $2 $3
.Voice:/mode # +vvv $$1 $2 $3
.Devoice:/mode # -vvv $$1 $2 $3
new:
.Op:/var %count = $min($0,$modespl,3) | /mode # + $+ $str(o,%count) $gettok($$1-,1- %count,32)
.Deop:/var %count = $min($0,$modespl,3) | /mode # - $+ $str(o,%count) $gettok($$1-,1- %count,32)
.Voice:/var %count = $min($0,$modespl,3) | /mode # + $+ $str(v,%count) $gettok($$1-,1- %count,32)
.Devoice:/var %count = $min($0,$modespl,3) | /mode # - $+ $str(v,%count) $gettok($$1-,1- %count,32)
|
|
|
|
Joined: May 2021
Posts: 2
Bowl of petunias
|
Bowl of petunias
Joined: May 2021
Posts: 2 |
Heya dont work on mirc 7.65
Fixes for aliases.ini accessed in the Alt+D editor:
now:
/op /mode # +ooo $$1 $2 $3 /dop /mode # -ooo $$1 $2 $3
new:
/op /var %count = $min($0,$modespl,3) | /mode # + $+ $str(o,%count) $gettok($$1-,1- %count,32) /dop /var %count = $min($0,$modespl,3) | /mode # - $+ $str(o,%count) $gettok($$1-,1- %count,32)
Fixes for popups.ini accessed in the Alt+P editor where you select 'Nick List' from the editor's 'view' menu:
now:
.Op:/mode # +ooo $$1 $2 $3 .Deop:/mode # -ooo $$1 $2 $3 .Voice:/mode # +vvv $$1 $2 $3 .Devoice:/mode # -vvv $$1 $2 $3
new:
.Op:/var %count = $min($0,$modespl,3) | /mode # + $+ $str(o,%count) $gettok($$1-,1- %count,32) .Deop:/var %count = $min($0,$modespl,3) | /mode # - $+ $str(o,%count) $gettok($$1-,1- %count,32) .Voice:/var %count = $min($0,$modespl,3) | /mode # + $+ $str(v,%count) $gettok($$1-,1- %count,32) .Devoice:/var %count = $min($0,$modespl,3) | /mode # - $+ $str(v,%count) $gettok($$1-,1- %count,32)
i hope u can help thx
|
|
|
|
Joined: Apr 2004
Posts: 871
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 871 |
To elaborate on that: it seems that libera.chat's IRCd ("solanum-1.0-dev") returns "461 <nick> MODE :Not enough parameters" (so not the 696 numeric mentioned earlier) and does not apply any of the modes, which means the earlier workaround of just hiding the 696 numeric is unfortunately entirely ineffective on this ircd..
Saturn, QuakeNet staff
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
For all 6 lines of new code, the identifier $min($0,$modespl,3) should change to be $min($0,$modespl) Fixes for aliases.ini accessed in the Alt+D editor: now:
/op /mode # +ooo $$1 $2 $3
/dop /mode # -ooo $$1 $2 $3
new:
/op /var %count = $min($0,$modespl) | /mode # + $+ $str(o,%count) $gettok($$1-,1- %count,32)
/dop /var %count = $min($0,$modespl) | /mode # - $+ $str(o,%count) $gettok($$1-,1- %count,32)
Fixes for popups.ini accessed in the Alt+P editor where you select 'Nick List' from the editor's 'view' menu: now:
.Op:/mode # +ooo $$1 $2 $3
.Deop:/mode # -ooo $$1 $2 $3
.Voice:/mode # +vvv $$1 $2 $3
.Devoice:/mode # -vvv $$1 $2 $3
new:
.Op:/var %count = $min($0,$modespl) | /mode # + $+ $str(o,%count) $gettok($$1-,1- %count,32)
.Deop:/var %count = $min($0,$modespl) | /mode # - $+ $str(o,%count) $gettok($$1-,1- %count,32)
.Voice:/var %count = $min($0,$modespl) | /mode # + $+ $str(v,%count) $gettok($$1-,1- %count,32)
.Devoice:/var %count = $min($0,$modespl) | /mode # - $+ $str(v,%count) $gettok($$1-,1- %count,32)
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
The Popups don't want to be complex scripts that are confusing to look at by a hapless bystander. They should be simple and succinct.
If the default popups should change, at all, they should be to change +ooo to +oooo
Pro-tip, the IRC servers will automatically trim excessive unused op/voice modes for you, so there is never a reason to use $min() period.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Actually, there is a reason to use $min, and it's why this thread was created in the 1st place.
InspIRCd started spamming clients with error messages due to using +ooo with 1 nick, so using +oooo wouldn't help.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Let InspIRCd, the most poorly written IRCd, fix their own bugs as thousands of mIRC users complain to them.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
|