This commit actually broke TechBot badly. Not only the commands don't work anymore because the parameter parsing fails somewhere in ParametersParser.HandleSwitches (for eg. !rosbug 333 or !ntstatus 2307), but also some of the commands (!ntstatus, !wm and probably !winerror) aren't guarded for the case when no parameters are passed and crash horribly with NullReferenceException. I am not going to fix it since I don't like digging into regular expressions, but I would be glad if someone could look at it. I'll bring MyTechBot back online once the bugs are fixed.
Best regards, Filip Navara
On Wed, May 7, 2008 at 4:59 PM, mpiulachs@svn.reactos.org wrote:
Author: mpiulachs Date: Wed May 7 09:59:28 2008 New Revision: 33344
URL: http://svn.reactos.org/svn/reactos?rev=33344&view=rev Log:
- code refactoring
- made more and more easily extensible:
- commands automatically loaded from plugins dlls
- declarative and automatic command parameter parsing
- common code moved to base classes
- other fixes
Added: trunk/irc/TechBot/TechBot.Console/ConsoleTechBotService.cs (with props) trunk/irc/TechBot/TechBot.Library/Attributes/ trunk/irc/TechBot/TechBot.Library/Attributes/CommandAttribute.cs
(with props)
trunk/irc/TechBot/TechBot.Library/Attributes/CommandParameterAliasAttribute.cs
(with props)
trunk/irc/TechBot/TechBot.Library/Attributes/CommandParameterAttribute.cs
(with props)
trunk/irc/TechBot/TechBot.Library/Collections/ trunk/irc/TechBot/TechBot.Library/Collections/CommandBuilderCollection.cs
(with props)
trunk/irc/TechBot/TechBot.Library/Commands/ApiCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/ApiCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/Base/Command.cs - copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/Command.cs
trunk/irc/TechBot/TechBot.Library/Commands/Base/XmlLookupCommand.cs
(with props)
trunk/irc/TechBot/TechBot.Library/Commands/BugCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/BugCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/ErrorCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/HelpCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/HelpCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/HresultCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/HresultCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/NtStatusCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/ReactOSBugUrl.cs - copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/ReactOSBugUrl.cs
trunk/irc/TechBot/TechBot.Library/Commands/SambaBugUrl.cs - copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/SambaBugUrl.cs
trunk/irc/TechBot/TechBot.Library/Commands/SvnCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/SvnCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/WineBugUrl.cs - copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/WineBugUrl.cs
trunk/irc/TechBot/TechBot.Library/Commands/WinerrorCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs
trunk/irc/TechBot/TechBot.Library/Commands/WmCommand.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/WmCommand.cs
trunk/irc/TechBot/TechBot.Library/Factory/ trunk/irc/TechBot/TechBot.Library/Factory/CommandBuilder.cs
(with props)
trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs
(with props)
trunk/irc/TechBot/TechBot.Library/ParametersParser.cs (with props) trunk/irc/TechBot/TechBot.Library/TechBotIrcService.cs
(contents, props changed)
- copied, changed from r31130,
trunk/irc/TechBot/TechBot.Library/IrcService.cs
trunk/irc/TechBot/TechBot/ProjectInstaller.cs (with props)Removed: trunk/irc/TechBot/Default.build trunk/irc/TechBot/TechBot.Library/ApiCommand.cs trunk/irc/TechBot/TechBot.Library/BugCommand.cs trunk/irc/TechBot/TechBot.Library/Command.cs trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs trunk/irc/TechBot/TechBot.Library/HelpCommand.cs trunk/irc/TechBot/TechBot.Library/HresultCommand.cs trunk/irc/TechBot/TechBot.Library/IrcService.cs trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs trunk/irc/TechBot/TechBot.Library/ReactOSBugUrl.cs trunk/irc/TechBot/TechBot.Library/SambaBugUrl.cs trunk/irc/TechBot/TechBot.Library/SvnCommand.cs trunk/irc/TechBot/TechBot.Library/WineBugUrl.cs trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs trunk/irc/TechBot/TechBot.Library/WmCommand.cs trunk/irc/TechBot/TechBot.cmbx Modified: trunk/irc/TechBot/TechBot.Console/Main.cs trunk/irc/TechBot/TechBot.Console/TechBot.Console.csproj trunk/irc/TechBot/TechBot.Library/Commands/Base/XmlCommand.cs trunk/irc/TechBot/TechBot.Library/MessageContext.cs trunk/irc/TechBot/TechBot.Library/ServiceOutput.cs trunk/irc/TechBot/TechBot.Library/TechBot.Library.csproj trunk/irc/TechBot/TechBot.Library/TechBotService.cs trunk/irc/TechBot/TechBot/ServiceThread.cs trunk/irc/TechBot/TechBot/TechBot.csproj trunk/irc/TechBot/TechBot/TechBotService.cs
[This mail would be too long, it was shortened to contain the URLs only.]
Removed: trunk/irc/TechBot/Default.build URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/Default.build?rev=33343...
Added: trunk/irc/TechBot/TechBot.Console/ConsoleTechBotService.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Console/Console...
Modified: trunk/irc/TechBot/TechBot.Console/Main.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Console/Main.cs...
Modified: trunk/irc/TechBot/TechBot.Console/TechBot.Console.csproj URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Console/TechBot...
Removed: trunk/irc/TechBot/TechBot.Library/ApiCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/ApiComm...
Added: trunk/irc/TechBot/TechBot.Library/Attributes/CommandAttribute.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Attribu...
Added: trunk/irc/TechBot/TechBot.Library/Attributes/CommandParameterAliasAttribute.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Attribu...
Added: trunk/irc/TechBot/TechBot.Library/Attributes/CommandParameterAttribute.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Attribu...
Removed: trunk/irc/TechBot/TechBot.Library/BugCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/BugComm...
Added: trunk/irc/TechBot/TechBot.Library/Collections/CommandBuilderCollection.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Collect...
Removed: trunk/irc/TechBot/TechBot.Library/Command.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/ApiCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/ApiCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/Base/Command.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/Command.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Modified: trunk/irc/TechBot/TechBot.Library/Commands/Base/XmlCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Added: trunk/irc/TechBot/TechBot.Library/Commands/Base/XmlLookupCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/BugCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/BugCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/ErrorCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/HelpCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/HelpCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/HresultCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/HresultCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/NtStatusCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/ReactOSBugUrl.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/ReactOSBugUrl.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/SambaBugUrl.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/SambaBugUrl.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/SvnCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/SvnCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/WineBugUrl.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/WineBugUrl.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/WinerrorCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Copied: trunk/irc/TechBot/TechBot.Library/Commands/WmCommand.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/WmCommand.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Command...
Removed: trunk/irc/TechBot/TechBot.Library/ErrorCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/ErrorCo...
Added: trunk/irc/TechBot/TechBot.Library/Factory/CommandBuilder.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Factory...
Added: trunk/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Factory...
Removed: trunk/irc/TechBot/TechBot.Library/HelpCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/HelpCom...
Removed: trunk/irc/TechBot/TechBot.Library/HresultCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Hresult...
Removed: trunk/irc/TechBot/TechBot.Library/IrcService.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/IrcServ...
Modified: trunk/irc/TechBot/TechBot.Library/MessageContext.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Message...
Removed: trunk/irc/TechBot/TechBot.Library/NtStatusCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/NtStatu...
Added: trunk/irc/TechBot/TechBot.Library/ParametersParser.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Paramet...
Removed: trunk/irc/TechBot/TechBot.Library/ReactOSBugUrl.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/ReactOS...
Removed: trunk/irc/TechBot/TechBot.Library/SambaBugUrl.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/SambaBu...
Modified: trunk/irc/TechBot/TechBot.Library/ServiceOutput.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Service...
Removed: trunk/irc/TechBot/TechBot.Library/SvnCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/SvnComm...
Modified: trunk/irc/TechBot/TechBot.Library/TechBot.Library.csproj URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/TechBot...
Copied: trunk/irc/TechBot/TechBot.Library/TechBotIrcService.cs
(from r31130, trunk/irc/TechBot/TechBot.Library/IrcService.cs)
URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/TechBot...
Modified: trunk/irc/TechBot/TechBot.Library/TechBotService.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/TechBot...
Removed: trunk/irc/TechBot/TechBot.Library/WineBugUrl.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/WineBug...
Removed: trunk/irc/TechBot/TechBot.Library/WinerrorCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/Winerro...
Removed: trunk/irc/TechBot/TechBot.Library/WmCommand.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.Library/WmComma...
Removed: trunk/irc/TechBot/TechBot.cmbx URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot.cmbx?rev=33343&...
Added: trunk/irc/TechBot/TechBot/ProjectInstaller.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot/ProjectInstalle...
Modified: trunk/irc/TechBot/TechBot/ServiceThread.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot/ServiceThread.c...
Modified: trunk/irc/TechBot/TechBot/TechBot.csproj URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot/TechBot.csproj?...
Modified: trunk/irc/TechBot/TechBot/TechBotService.cs URL: http://svn.reactos.org/svn/reactos/trunk/irc/TechBot/TechBot/TechBotService....