Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/msg nick pattern error #324

Closed
trevarj opened this issue May 17, 2021 · 1 comment · Fixed by #325
Closed

/msg nick pattern error #324

trevarj opened this issue May 17, 2021 · 1 comment · Fixed by #325

Comments

@trevarj
Copy link
Contributor

trevarj commented May 17, 2021

Reported on IRC:

using /msg *status znc_help gives a tiny error msg. i think the pattern matched
for /msg needs to change to support *status

It appears that we don't match on '*' for the nickname in /msg

pub(crate) fn is_nick_first_char(c: char) -> bool {
    c.is_alphabetic() || "[]\\`_^{|}".contains(c)
}
@osa1
Copy link
Owner

osa1 commented May 17, 2021

According to RFC 2812 nicks can't start with *. The code you quoted implements nicks as described in RFC 2812.

That said, I think it's fine to just reject # as the first character (as /msg is for PRIVMSGs to users, not channels) and accept everything else.

We could also repurpose /msg to allow sending to channels too. I don't remember why I wanted to disallow channel names in /msg.

I suggest we do the former for now and allow everything except # as the first char.

trevarj added a commit to trevarj/tiny that referenced this issue May 17, 2021
Changed the /msg command to allow sending to any nick unless it begins
with '#'.

Fixes osa1#324
trevarj added a commit to trevarj/tiny that referenced this issue May 17, 2021
Changed the /msg command to allow sending to any nick unless it begins
with '#'.

Fixes osa1#324
@osa1 osa1 closed this as completed in #325 May 18, 2021
osa1 pushed a commit that referenced this issue May 18, 2021
Changed the /msg command to allow sending to any nick unless it begins
with '#'.

Fixes #324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants