diff --git a/Core/RLV/Version/version.cs b/Core/RLV/Version/version.cs index 3c1d8ef..9174d1e 100644 --- a/Core/RLV/Version/version.cs +++ b/Core/RLV/Version/version.cs @@ -4,17 +4,24 @@ using System.Text; namespace BSB.RLV.Version { - public class Version : RLV_command_1arg + public class Version : RLV_command { public override bool CallFunction(string[] args) { - _ = int.TryParse(args[0], out int channel); + int channel = 0; + if (args.Length == 1) + { + _ = int.TryParse(args[0], out channel); + } if (channel >= 0) { bot.GetClient.Self.Chat("RestrainedLife BOT (RLVa 2.9)", channel, OpenMetaverse.ChatType.Normal); return true; } - return Failed("Invaild channel given"); + else + { + return Failed("Invaild channel given"); + } } } } diff --git a/Core/RLV/Version/versionnew.cs b/Core/RLV/Version/versionnew.cs index 51c6432..07366ae 100644 --- a/Core/RLV/Version/versionnew.cs +++ b/Core/RLV/Version/versionnew.cs @@ -4,17 +4,24 @@ using System.Text; namespace BSB.RLV.Version { - public class VersionNew : RLV_command_1arg + public class VersionNew : RLV_command { public override bool CallFunction(string[] args) { - _ = int.TryParse(args[0], out int channel); + int channel = 0; + if (args.Length == 1) + { + _ = int.TryParse(args[0], out channel); + } if (channel >= 0) { bot.GetClient.Self.Chat("RestrainedLove BOT (RLVa 2.9)", channel, OpenMetaverse.ChatType.Normal); return true; } - return Failed("Invaild channel given"); + else + { + return Failed("Invaild channel given"); + } } } } diff --git a/Core/RLV/Version/versionnum.cs b/Core/RLV/Version/versionnum.cs index 6a89e13..ceb64e0 100644 --- a/Core/RLV/Version/versionnum.cs +++ b/Core/RLV/Version/versionnum.cs @@ -4,17 +4,24 @@ using System.Text; namespace BSB.RLV.Version { - public class VersionNum : RLV_command_1arg + public class VersionNum : RLV_command { public override bool CallFunction(string[] args) { - _ = int.TryParse(args[0], out int channel); + int channel = 0; + if (args.Length == 1) + { + _ = int.TryParse(args[0], out channel); + } if (channel >= 0) { bot.GetClient.Self.Chat("209000", channel, OpenMetaverse.ChatType.Normal); return true; } - return Failed("Invaild channel given"); + else + { + return Failed("Invaild channel given"); + } } } }