public void SendNotice(string target, string message) { const string command = "NOTICE"; int maxMsgLength = 512 - CountNonMessageCharacters(command.Length, target.Length); var messages = MessageSplit.IrcSplit(message, maxMsgLength); foreach (string msg in messages) { if (AllowOutput(target)) { irc.SendMessage(SendType.Notice, target, msg); chatLog.Notice(target, msg); } } }
public static List <string> IrcSplit(string message, int maxByteCount) { var m = new MessageSplit(message); return(m.GetChunks(maxByteCount)); }