mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
Prevent newlines in IRC messages
This commit is contained in:
@@ -443,6 +443,12 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
/// <inheritdoc />
|
||||
public override Task SendMessage(ulong channelId, string message, CancellationToken cancellationToken) => Task.Factory.StartNew(() =>
|
||||
{
|
||||
// IRC doesn't allow newlines
|
||||
message = String.Concat(
|
||||
message
|
||||
.Where(x => x != '\r')
|
||||
.Select(x => x == '\n' ? '|' : x));
|
||||
|
||||
var channelName = channelIdMap[channelId];
|
||||
SendType sendType;
|
||||
if (channelName == null)
|
||||
|
||||
Reference in New Issue
Block a user