public void sendError(string Service, LocalClient ServiceClient, Client Source, string message, string command) { if (message != null&& message.Length > 0) { if (HelpResponses[Service].Errors.Contains(message)) { foreach (string tString in HelpResponses[Service].Errors[message]) { ServiceClient.Send_Notice(Source.nick, tString); } string tError = HelpResponses[Service].Errors["error"][0]; ServiceClient.Send_Notice(Source.nick, string.Format(tError, ServiceClient.nick, command)); } else { ServiceClient.Send_Notice(Source.nick, "Information missing for: " + message); } Console.WriteLine("o no"); } }
public void sendResponse(string Service, LocalClient ServiceClient, Client Source, string message, params string[] Params) { if (message != null&& message.Length > 0) { if (HelpResponses[Service].Errors.Contains(message)) { foreach (string tString in HelpResponses[Service].Errors[message]) { ServiceClient.Send_Notice(Source.nick, string.Format(tString, Params)); } } else { ServiceClient.Send_Notice(Source.nick, "Information missing for: " + message); } } }
public void sendHelp(string Service, LocalClient ServiceClient, Client Source, string[] Params) { if (Params == null) { ServiceCommandResponse tResponse; tResponse = HelpResponses[Service].Commands["help"]; foreach (string tString in tResponse.Value) { ServiceClient.Send_Notice(Source.nick, tString); } } else { //bool tSent = false; //ServiceCommandResponse tResponse; BlackLight.Services.Modules.Help.Lists.CommandList tList = HelpResponses[Service].Commands; for (int tInt = 0; tInt <= Params.GetUpperBound(0); tInt++) { if (tList.Contains(Params[tInt])) { if (tInt == Params.GetUpperBound(0)) { foreach (string tString in tList[Params[tInt]].Value) { ServiceClient.Send_Notice(Source.nick, tString); } break; } else { tList = tList[Params[tInt]].Commands; } } else { string tString = ""; foreach (string tVal in Params) { tString += " " + tVal; } ServiceClient.Send_Notice(Source.nick, "No help available for" + tString); break; } } } }