Skip to content

Commit

Permalink
/msg cmd, first char of nick
Browse files Browse the repository at this point in the history
Changed the /msg command to allow sending to any nick unless it begins
with '#'.

Fixes osa1#324
  • Loading branch information
trevarj committed May 17, 2021
1 parent 24c8e9e commit 5f157ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/tiny/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ pub(crate) fn split_whitespace_indices(str: &str) -> SplitWhitespaceIndices {
// letter = %x41-5A / %x61-7A ; A-Z / a-z
// special = %x5B-60 / %x7B-7D ; "[", "]", "\", "`", "_", "^", "{", "|", "}"
//
// we use a simpler check here (allows strictly more nicks)

// We use a simpler check here (allows strictly more nicks)
// Only check to see if the nick does not begin with '#', https://github.com/osa1/tiny/issues/324
pub(crate) fn is_nick_first_char(c: char) -> bool {
c.is_alphabetic() || "[]\\`_^{|}".contains(c)
c != '#'
}

/*
Expand Down

0 comments on commit 5f157ec

Please sign in to comment.