mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Backport support for the IRCv3 websocket subprotocols.
This commit is contained in:
parent
cf87603832
commit
87145f5790
@ -450,8 +450,11 @@ class WebSocketHook : public IOHookMiddle
|
||||
{
|
||||
proto.erase(std::remove_if(proto.begin(), proto.end(), ::isspace), proto.end());
|
||||
|
||||
bool is_binary = stdalgo::string::equalsci(proto, "binary.inspircd.org");
|
||||
bool is_text = stdalgo::string::equalsci(proto, "text.inspircd.org");
|
||||
bool is_binary = (sock->type == StreamSocket::SS_USER && stdalgo::string::equalsci(proto, "binary.ircv3.net"))
|
||||
|| stdalgo::string::equalsci(proto, "binary.inspircd.org");
|
||||
|
||||
bool is_text = (sock->type == StreamSocket::SS_USER && stdalgo::string::equalsci(proto, "text.ircv3.net"))
|
||||
|| stdalgo::string::equalsci(proto, "text.inspircd.org");
|
||||
|
||||
if (is_binary || is_text)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user