mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
modes: Allow 'MODE b' (used by irssi for channel sync) (thanks @dx!)
This commit is contained in:
parent
3b0d9c4db9
commit
2759d8f5d3
23
irc/modes.go
23
irc/modes.go
@ -224,16 +224,10 @@ func ParseUserModeChanges(params ...string) (ModeChanges, map[rune]bool) {
|
||||
changes := make(ModeChanges, 0)
|
||||
unknown := make(map[rune]bool)
|
||||
|
||||
op := List
|
||||
|
||||
if 0 < len(params) {
|
||||
modeArg := params[0]
|
||||
op := ModeOp(modeArg[0])
|
||||
if (op == Add) || (op == Remove) {
|
||||
modeArg = modeArg[1:]
|
||||
} else {
|
||||
unknown[rune(modeArg[0])] = true
|
||||
return changes, unknown
|
||||
}
|
||||
|
||||
skipArgs := 1
|
||||
|
||||
for _, mode := range modeArg {
|
||||
@ -408,19 +402,10 @@ func ParseChannelModeChanges(params ...string) (ModeChanges, map[rune]bool) {
|
||||
changes := make(ModeChanges, 0)
|
||||
unknown := make(map[rune]bool)
|
||||
|
||||
op := List
|
||||
|
||||
if 0 < len(params) {
|
||||
modeArg := params[0]
|
||||
if len(modeArg) == 0 {
|
||||
return changes, unknown
|
||||
}
|
||||
op := ModeOp(modeArg[0])
|
||||
if (op == Add) || (op == Remove) {
|
||||
modeArg = modeArg[1:]
|
||||
} else {
|
||||
unknown[rune(modeArg[0])] = true
|
||||
return changes, unknown
|
||||
}
|
||||
|
||||
skipArgs := 1
|
||||
|
||||
for _, mode := range modeArg {
|
||||
|
Loading…
Reference in New Issue
Block a user