forked from External/ergo
implement draft/read-marker capability
This commit is contained in:
parent
6bd94391ef
commit
32f7868bfd
11 changed files with 190 additions and 79 deletions
|
|
@ -165,6 +165,17 @@ func CasefoldName(name string) (string, error) {
|
|||
return lowered, err
|
||||
}
|
||||
|
||||
// CasefoldTarget returns a casefolded version of an IRC target, i.e.
|
||||
// it determines whether the target is a channel name or nickname and
|
||||
// applies the appropriate casefolding rules.
|
||||
func CasefoldTarget(name string) (string, error) {
|
||||
if strings.HasPrefix(name, "#") {
|
||||
return CasefoldChannel(name)
|
||||
} else {
|
||||
return CasefoldName(name)
|
||||
}
|
||||
}
|
||||
|
||||
// returns true if the given name is a valid ident, using a mix of Insp and
|
||||
// Chary's ident restrictions.
|
||||
func isIdent(name string) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue