Code cleanup

This commit is contained in:
JustArchi
2017-02-20 15:06:45 +01:00
parent 7ec81bda7d
commit 8bd4c6a91d

View File

@@ -303,6 +303,15 @@ namespace ArchiSteamFarm {
}
}
internal static string FormatBotResponse(string response, string botName) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + "<" + botName + "> " + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
internal static string GetAPIStatus() {
var response = new {
Bots
@@ -753,6 +762,24 @@ namespace ArchiSteamFarm {
SteamClient.Disconnect();
}
private string FormatBotResponse(string response) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + "<" + BotName + "> " + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
private static string FormatStaticResponse(string response) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
private static HashSet<Bot> GetBots(string args) {
if (string.IsNullOrEmpty(args)) {
ASF.ArchiLogger.LogNullError(nameof(args));
@@ -2875,33 +2902,6 @@ namespace ArchiSteamFarm {
return null;
}
private string FormatBotResponse(string response) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + "<" + BotName + "> " + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
internal static string FormatBotResponse(string response, string botName) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + "<" + botName + "> " + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
private static string FormatStaticResponse(string response) {
if (!string.IsNullOrEmpty(response)) {
return Environment.NewLine + response;
}
ASF.ArchiLogger.LogNullError(nameof(response));
return null;
}
private void SendMessageToChannel(ulong steamID, string message) {
if ((steamID == 0) || string.IsNullOrEmpty(message)) {
ArchiLogger.LogNullError(nameof(steamID) + " || " + nameof(message));