solanum icon indicating copy to clipboard operation
solanum copied to clipboard

PRIVMSG nick@server is broken

Open aaronmdjones opened this issue 4 years ago • 3 comments

https://github.com/solanum-ircd/solanum/blob/52f1947f562f2f44e17f9e5425fd99525742d9ad/modules/core/m_message.c#L948-L992

Line 971 uses the whole value of nick (i.e. the @ is not replaced with \0), so on the destination server, it will hit line 989.

aaronmdjones avatar Jul 19 '21 02:07 aaronmdjones

This should be adjusted to confirm that the nick is on the server in question, and then strip the @. This will also avoid handle_special getting called unnecessarily on every server in the chain.

aaronmdjones avatar Jul 19 '21 02:07 aaronmdjones

Alternatively, if we only want to support this for services, which I think is what the comment at the bottom is trying to get at, we should make the code reflect that reality: check if the server is u:lined, check if the nick is on it, and unconditionally reply with ERR_NOSUCHNICK otherwise on the sending client's server. Again there's no real need to call this on every server in the chain.

aaronmdjones avatar Jul 19 '21 03:07 aaronmdjones

The comment there seems like an entirely reasonable rationale for the current behaviour; we don't support it as a destination but do relay it for the benefit of pseudoservers that do. I don't think there's any particular need to assume everything with a service block supports user@server. We could make the error message in this case indicate that user@server isn't supported for normal users.

edk0 avatar Sep 08 '21 13:09 edk0