|
@@ -511,6 +511,11 @@ impl<C: AsyncRead + AsyncWrite + Send + Unpin + 'static> IrcServerConnection<C>
|
|
|
return Err(Error::ChannelStopped)
|
|
return Err(Error::ChannelStopped)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if line == "\n" || line == "\r\n" {
|
|
|
|
|
+ warn!("Closing connection.");
|
|
|
|
|
+ return Err(Error::ChannelStopped)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if &line[(line.len() - 2)..] == "\r\n" {
|
|
if &line[(line.len() - 2)..] == "\r\n" {
|
|
|
// Remove CRLF
|
|
// Remove CRLF
|
|
|
line.pop();
|
|
line.pop();
|
|
@@ -522,11 +527,6 @@ impl<C: AsyncRead + AsyncWrite + Send + Unpin + 'static> IrcServerConnection<C>
|
|
|
return Err(Error::ChannelStopped)
|
|
return Err(Error::ChannelStopped)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if line == "\n" {
|
|
|
|
|
- warn!("Closing connection.");
|
|
|
|
|
- return Err(Error::ChannelStopped)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
Ok(line.clone())
|
|
Ok(line.clone())
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|