private String FormatChannelResponse(IrcConversationMessage conversation) { var message = RemovePrefix(conversation.Message); message = RemoveType(message); message = RemoveParameter(message); return message; }
private String FormatChannelRequest(IrcConversationMessage conversation) { var str = String.Empty; str = RetrieveUsername(conversation.Message); if (String.Equals(conversation.MessageType, IrcDefinition.Request.Join)) { str += " joined channel"; } else if (String.Equals(conversation.MessageType, IrcDefinition.Request.Mode)) { var message = RemovePrefix(conversation.Message); message = RemoveType(message); message = RemoveParameter(message); str += " sets mode "; str += message; } else if (String.Equals(conversation.MessageType, IrcDefinition.Request.Part)) { str += " has left channel"; } else if (String.Equals(conversation.MessageType, IrcDefinition.Request.Topic)) { var message = RemovePrefix(conversation.Message); message = RemoveType(message); message = RemoveParameter(message); str += " sets topic to "; str += message; } else { return conversation.Message; } return str; }
private String FormatMessage(IrcConversationMessage conversation) { var str = String.Empty; str = "<" +RetrieveUsername(conversation.Message) +"> "; var message = RemovePrefix(conversation.Message); message = RemoveType(message); message = RemoveParameter(message); message = RemoveColon(message); str += message; return str; }
private String FormatServerResponse(IrcConversationMessage conversation) { var message = RemovePrefix(conversation.Message); message = RemoveType(message); message = RemoveColon(message); if (message.Contains(' ')) { if ((message.Substring(0, message.IndexOf(' ')) == conversation.Username)) { message = message.Remove(0, message.IndexOf(' ') + 1); } } message = RemoveColon(message); return RemoveLineEnd(message); }
private String FormatServerRequest(IrcConversationMessage conversation) { return RemovePrefix(conversation.Message); }