-
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: quote ListAttribute items when required
In a ListAttribute, a value can start with a #, which is then considered as a comment by the Config reader. This is bad news, as channel names usually start with a # (they can start with a & too, which is less common on freenode). To prevent this, what I do is: * quote the item only if necessary * unquote it if it correspond to a very specific pattern `"#<name>"` This way, we can have this ListAttribute: channels = "#sopel" &private Edge case like `"&something"` won't be unquoted, because they don't match the exact pattern! (with applied suggestions from code review) Co-Authored-By: dgw <[email protected]>
- Loading branch information
Showing
2 changed files
with
110 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters