correctly handle some BS edge cases for PRIVMSG
This commit is contained in:
parent
8b76a2b6db
commit
b868915d64
|
@ -270,8 +270,9 @@ let dispatch t = function
|
|||
| "USER", unm :: _ :: _ :: rnm :: _ -> on_msg_user t unm rnm
|
||||
| "QUIT", why -> on_msg_quit t why
|
||||
| "MOTD", _ -> on_msg_motd t
|
||||
| "PRIVMSG", ([] | "" :: _) -> Error norecipient
|
||||
| "PRIVMSG", ([_] | _ :: "" :: _) -> Error notexttosend
|
||||
| "PRIVMSG", tgt :: msg :: _ -> on_msg_privmsg t tgt msg
|
||||
| "PRIVMSG", [_] -> Error notexttosend | "PRIVMSG", [] -> Error norecipient
|
||||
| "JOIN", tgt :: _ when tgt <> "" -> on_msg_join t tgt
|
||||
| "NAMES", tgt :: _ when tgt <> "" -> on_msg_names t tgt
|
||||
| "PART", tgt :: _ when tgt <> "" -> on_msg_part t tgt
|
||||
|
|
Loading…
Reference in New Issue