Add support for STATUSMSG

Closes: https://todo.sr.ht/~emersion/gamja/65
This commit is contained in:
Simon Ser
2021-06-03 13:31:43 +02:00
parent 3b5b693403
commit 6e20ad872e
2 changed files with 11 additions and 3 deletions
+2 -3
View File
@@ -210,11 +210,10 @@ export function formatMessage(msg) {
}
/** Split a prefix and a name out of a target. */
export function parseTargetPrefix(s) {
// TODO: use the PREFIX token from RPL_ISUPPORT
export function parseTargetPrefix(s, allowedPrefixes = STD_MEMBERSHIPS) {
var i;
for (i = 0; i < s.length; i++) {
if (STD_MEMBERSHIPS.indexOf(s[i]) < 0) {
if (allowedPrefixes.indexOf(s[i]) < 0) {
break;
}
}