RLV patch for version commands, now if you dont define a channel it will default to zero
This commit is contained in:
parent
93e95c98d0
commit
39359368f6
3 changed files with 30 additions and 9 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue