public override void Build() { SendingBuffer = IRCReplyBuilder.Build(_result.UserIRCPrefix, ResponseName.PrivateMsg, _result.TargetName, _request.Message); }
public override void Build() { SendingBuffer = IRCReplyBuilder.Build( ResponseName.WhoIsUser, cmdParams: $"{_result.NickName} {_result.Name} {_result.UserName} {_result.PublicIPAddress} *", _result.UserName); if (_result.JoinedChannelName.Count() != 0) { string channelNames = ""; //todo remove last space foreach (var name in _result.JoinedChannelName) { channelNames += $"@{name} "; } SendingBuffer += IRCReplyBuilder.Build( ResponseName.WhoIsChannels, $"{_result.NickName} {_result.Name}", channelNames ); SendingBuffer += IRCReplyBuilder.Build( ResponseName.EndOfWhoIs, $"{_result.NickName} {_result.Name}", "End of /WHOIS list." ); } }
public static string BuildWelcomeReply(string nickName) { return(IRCReplyBuilder.Build( ResponseName.Welcome, cmdParams: nickName, tailing: "Welcome to UniSpy!")); }
public override void Build() { var cmdParams = $"* {ChatCrypt.ClientKey} {ChatCrypt.ServerKey}"; SendingBuffer = IRCReplyBuilder.Build( ResponseName.SecureKey, cmdParams); }
public override void Build() { //CDKey is always true var cmdParams = $"param1 1 :Authenticated"; SendingBuffer = IRCReplyBuilder.Build( ResponseName.CDKey, cmdParams); }
public static string BuildWhoReply(WhoDataModel data) { var cmdParams = $"param1 {data.ChannelName} {data.UserName} " + $"{data.PublicIPAddress} param5 {data.NickName} {data.Modes} param8"; return(IRCReplyBuilder.Build(ResponseName.WhoReply, cmdParams)); }
public static string BuildPartReply(string userIRCPrefix, string channelName, string message) { return(IRCReplyBuilder.Build( userIRCPrefix, ResponseName.Part, channelName, message)); }
public static string BuildEndOfNameReply(string nickName, string channelName) { string cmdParams = $"{nickName} {channelName}"; string tailing = @"End of /NAMES list."; return(IRCReplyBuilder.Build( ResponseName.EndOfNames, cmdParams, tailing)); }
public override void Build() { var cmdParams = $"param1 {_result.ChannelName} {_request.Cookie} {_result.Values}"; SendingBuffer = IRCReplyBuilder.Build( _result.ChannelUserIRCPrefix, ResponseName.GetChanKey, cmdParams, null); }
public static string BuildEndOfWhoReply(string name) { var cmdParams = $"param1 {name} param3"; var tailing = "End of WHO."; return(IRCReplyBuilder.Build( ResponseName.EndOfWho, cmdParams, tailing)); }
public static string BuildEndOfGetCKeyReply(string channelName, string cookie) { var cmdParams = $"param1 {channelName} {cookie}"; var tailing = "End Of /GETCKEY."; return(IRCReplyBuilder.Build( ResponseName.EndGetCKey, cmdParams, tailing)); }
public override void Build() { SendingBuffer = ""; foreach (var data in _result.DataResults) { SendingBuffer += IRCReplyBuilder.Build(ResponseName.GetCKey, $"* {data.NickName} {_request.ChannelName} {_request.Cookie} {data.UserValues}"); } SendingBuffer += IRCReplyBuilder.Build(ResponseName.EndGetCKey, $"* {_request.ChannelName} {_request.Cookie}", "End Of /GETCKEY."); }
public override void Build() { SendingBuffer = ""; foreach (var flag in _result.Flags) { string cmdParams1 = $"param1 {_result.NickName} {_request.Cookie} {flag}"; SendingBuffer += IRCReplyBuilder.Build(ResponseName.GetKey, cmdParams1); } string cmdParams2 = $"param1 param2 {_request.Cookie} param4"; string tailing = "End of GETKEY."; SendingBuffer += IRCReplyBuilder.Build(ResponseName.EndGetKey, cmdParams2, tailing); }
public override void Build() { SendingBuffer = ""; foreach (var info in _result.ChannelInfoList) { var cmdParams = $"param1 {info.ChannelName} {info.TotalChannelUsers} {info.ChannelTopic}"; SendingBuffer += IRCReplyBuilder.Build( _result.UserIRCPrefix, ResponseName.ListStart, cmdParams, null); } SendingBuffer += IRCReplyBuilder.Build(_result.UserIRCPrefix, ResponseName.ListEnd, null, null); }
public override void Build() { if (_request.RequestType == ModeRequestType.GetChannelModes) { //channel modes reply string cmdParams = $"{_result.ChannelName} {_result.ChannelModes}"; SendingBuffer = IRCReplyBuilder.Build(ResponseName.Mode, cmdParams); } else if (_request.RequestType == ModeRequestType.GetChannelUserModes) { //channel user mode reply string cmdParams = $"{_result.JoinerNickName} {_result.ChannelName} {_result.ChannelModes}"; SendingBuffer = IRCReplyBuilder.Build(ResponseName.ChannelModels, cmdParams); } }
public override void Build() { string flags = ""; foreach (var kv in _request.KeyValue) { flags += $@"\{kv.Key}\{kv.Value}"; } var cmdParams = $"param1 {_request.ChannelName} BCAST {flags}"; SendingBuffer = IRCReplyBuilder.Build( _result.ChannelUserIRCPrefix, ResponseName.GetChanKey, cmdParams, null); }
public override void Build() { // string modeReply = MODEResponse.BuildChannelModeReply( // _request.ChannelName, _result.ChannelModes); // if (!_result.IsAlreadyJoinedChannel) // { // SendingBufferOfChannelUsers = ChatIRCReplyBuilder.Build( // _result.JoinerPrefix, // ChatReplyName.JOIN, // _request.ChannelName, // null); // SendingBufferOfChannelUsers += modeReply; // } SendingBuffer = IRCReplyBuilder.Build( _result.JoinerPrefix, ResponseName.Join, _request.ChannelName, null); }
public void Build() { SendingBuffer = IRCReplyBuilder.Build(ErrorCode); }
public override void Build() { SendingBuffer = IRCReplyBuilder.Build(_result.RequesterIRCPrefix, ResponseName.Pong, null, null); }
public static string BuildGetCKeyReply(string nickname, string channelName, string cookie, string flags) { var cmdParams = $"* {channelName} {nickname} {cookie} {flags}"; return(IRCReplyBuilder.Build(ResponseName.GetCKey, cmdParams)); }
public override void Build() { SendingBuffer = IRCReplyBuilder.Build( ResponseName.Login, cmdParams: $"* {_result.UserID} {_result.ProfileId}"); }
public static string BuildChannelUserModesReply(string nickName, string channelName, string modes) { return(IRCReplyBuilder.Build(ResponseName.ChannelModels, $"{nickName} {channelName} {modes}")); }
public override void Build() { SendingBuffer = IRCReplyBuilder.Build(_result.UserIRCPrefix, ResponseName.UnderTheTableMsg, _result.Name, _request.Message); }
public static string BuildChannelModeReply(string channelName, string modes) { var cmdParams = $"{channelName} {modes}"; return(IRCReplyBuilder.Build(ResponseName.Mode, cmdParams)); }
public static string BuildNameReply(string nickName, string channelName, string nicksString) { return(IRCReplyBuilder.Build( ResponseName.NameReply, $"{nickName} = {channelName}", nicksString)); }
public override void Build() { string cmdParams = $"{_result.TargetName} {_request.Message}"; SendingBuffer = IRCReplyBuilder.Build(_result.UserIRCPrefix, ResponseName.AboveTheTableMsg, cmdParams); }
public static string BuildTopicReply(string channelName, string channelTopic) { return(IRCReplyBuilder.Build(ResponseName.ChannelTopic, channelName, channelTopic)); }
public static string BuildNoTopicReply(string channelName) { return(IRCReplyBuilder.Build(ResponseName.NoTopic, channelName)); }
public override void Build() { var cmdParams = $"{_result.ChannelName} {_result.KickerNickName} {_result.KickeeNickName}"; SendingBuffer = IRCReplyBuilder.Build(_result.KickerIRCPrefix, ResponseName.Kick, cmdParams, null); }
public static string BuildUserIPReply(string ip) { return(IRCReplyBuilder.Build(ResponseName.UserIP, null, $"@{ip}")); }