From 97e0ede1817f6ce529629297d1f30a705f3ae71b Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 14 Nov 2019 21:52:17 +0100 Subject: [PATCH] Misc --- ArchiSteamFarm/Plugins/PluginsCore.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ArchiSteamFarm/Plugins/PluginsCore.cs b/ArchiSteamFarm/Plugins/PluginsCore.cs index 9914eca24..172757774 100644 --- a/ArchiSteamFarm/Plugins/PluginsCore.cs +++ b/ArchiSteamFarm/Plugins/PluginsCore.cs @@ -175,8 +175,8 @@ namespace ArchiSteamFarm.Plugins { [ItemCanBeNull] internal static async Task OnBotCommand(Bot bot, ulong steamID, string message, string[] args) { - if ((bot == null) || (steamID == 0) || string.IsNullOrEmpty(message) || (args == null) || (args.Length == 0)) { - ASF.ArchiLogger.LogNullError(nameof(bot) + " || " + nameof(args)); + if ((bot == null) || (steamID == 0) || !new SteamID(steamID).IsIndividualAccount || string.IsNullOrEmpty(message) || (args == null) || (args.Length == 0)) { + ASF.ArchiLogger.LogNullError(nameof(bot) + " || " + nameof(steamID) + " || " + nameof(message) + " || " + nameof(args)); return null; } @@ -289,7 +289,7 @@ namespace ArchiSteamFarm.Plugins { } internal static async Task OnBotFriendRequest(Bot bot, ulong steamID) { - if ((bot == null) || (steamID == 0)) { + if ((bot == null) || (steamID == 0) || !new SteamID(steamID).IsIndividualAccount) { ASF.ArchiLogger.LogNullError(nameof(bot) + " || " + nameof(steamID)); return false; @@ -368,8 +368,8 @@ namespace ArchiSteamFarm.Plugins { [ItemCanBeNull] internal static async Task OnBotMessage(Bot bot, ulong steamID, string message) { - if ((bot == null) || (steamID == 0) || string.IsNullOrEmpty(message)) { - ASF.ArchiLogger.LogNullError(nameof(bot) + " || " + nameof(message)); + if ((bot == null) || (steamID == 0) || !new SteamID(steamID).IsIndividualAccount || string.IsNullOrEmpty(message)) { + ASF.ArchiLogger.LogNullError(nameof(bot) + " || " + nameof(steamID) + " || " + nameof(message)); return null; }