From 4442c49eca6f6a4010acf5600375980dbb989e87 Mon Sep 17 00:00:00 2001 From: Marc Piulachs Date: Sun, 18 May 2008 16:01:34 +0000 Subject: [PATCH] - small fix svn path=/trunk/; revision=33588 --- irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs | 2 +- irc/TechBot/TechBot.Commands.Common/HResultCommand.cs | 2 +- irc/TechBot/TechBot.Commands.Common/NtStatusCommand.cs | 2 +- irc/TechBot/TechBot.Commands.Common/WMCommand.cs | 2 +- irc/TechBot/TechBot.Commands.Common/WinerrorCommand.cs | 2 +- irc/TechBot/TechBot.Library/Commands/HelpCommand.cs | 4 +--- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs b/irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs index 32f419e6e6f..a3c6c1f31b0 100644 --- a/irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs +++ b/irc/TechBot/TechBot.Commands.Common/Base/BugCommand.cs @@ -20,7 +20,7 @@ namespace TechBot.Commands.Common public override void ExecuteCommand() { - if (Parameters == null) + if (string.IsNullOrEmpty(BugID)) { Say("Please provide a valid bug number."); } diff --git a/irc/TechBot/TechBot.Commands.Common/HResultCommand.cs b/irc/TechBot/TechBot.Commands.Common/HResultCommand.cs index 5d9f30d0adb..fd42239ba43 100644 --- a/irc/TechBot/TechBot.Commands.Common/HResultCommand.cs +++ b/irc/TechBot/TechBot.Commands.Common/HResultCommand.cs @@ -19,7 +19,7 @@ namespace TechBot.Commands.Common public override void ExecuteCommand() { - if (Text == null) + if (string.IsNullOrEmpty(Text)) { Say("Please provide a valid HRESULT value."); } diff --git a/irc/TechBot/TechBot.Commands.Common/NtStatusCommand.cs b/irc/TechBot/TechBot.Commands.Common/NtStatusCommand.cs index 1c3b6686877..96120e48bf3 100644 --- a/irc/TechBot/TechBot.Commands.Common/NtStatusCommand.cs +++ b/irc/TechBot/TechBot.Commands.Common/NtStatusCommand.cs @@ -19,7 +19,7 @@ namespace TechBot.Commands.Common public override void ExecuteCommand() { - if (Text == null) + if (string.IsNullOrEmpty(Text)) { Say("Please provide a valid NTSTATUS value."); } diff --git a/irc/TechBot/TechBot.Commands.Common/WMCommand.cs b/irc/TechBot/TechBot.Commands.Common/WMCommand.cs index 4f2ec61e95a..2b79f4ed7ef 100644 --- a/irc/TechBot/TechBot.Commands.Common/WMCommand.cs +++ b/irc/TechBot/TechBot.Commands.Common/WMCommand.cs @@ -26,7 +26,7 @@ namespace TechBot.Commands.Common public override void ExecuteCommand() { - if (WMText == null) + if (string.IsNullOrEmpty(WMText)) { Say("Please provide a valid window message value or name."); diff --git a/irc/TechBot/TechBot.Commands.Common/WinerrorCommand.cs b/irc/TechBot/TechBot.Commands.Common/WinerrorCommand.cs index d6736a3da26..46eadd267dc 100644 --- a/irc/TechBot/TechBot.Commands.Common/WinerrorCommand.cs +++ b/irc/TechBot/TechBot.Commands.Common/WinerrorCommand.cs @@ -19,7 +19,7 @@ namespace TechBot.Commands.Common public override void ExecuteCommand() { - if (Text == null) + if (string.IsNullOrEmpty(Text)) { Say("Please provide a valid System Error Code value."); } diff --git a/irc/TechBot/TechBot.Library/Commands/HelpCommand.cs b/irc/TechBot/TechBot.Library/Commands/HelpCommand.cs index ff68f81b35d..24824f220f7 100644 --- a/irc/TechBot/TechBot.Library/Commands/HelpCommand.cs +++ b/irc/TechBot/TechBot.Library/Commands/HelpCommand.cs @@ -7,8 +7,6 @@ namespace TechBot.Library [Command("help", Help = "!help or !help -name:[CommandName]", Description = "Shows this help , type 'help -name:[CommandName]'")] public class HelpCommand : Command { - private string m_CommandName = null; - public HelpCommand() { } @@ -22,7 +20,7 @@ namespace TechBot.Library public override void ExecuteCommand() { - if (CommandName == null) + if (string.IsNullOrEmpty(CommandName)) { Say("I support the following commands:"); -- 2.17.1