diff --git a/SecondBotEvents/Commands/Animation.cs b/SecondBotEvents/Commands/Animation.cs index 1a9a073..b9040c4 100644 --- a/SecondBotEvents/Commands/Animation.cs +++ b/SecondBotEvents/Commands/Animation.cs @@ -14,6 +14,7 @@ namespace SecondBotEvents.Commands [ReturnHints("Removed perm animation")] [ReturnHintsFailure("avatar lookup")] [ArgHints("avatar", "Who to accept requests from", "AVATAR")] + [CmdTypeSet()] public object AddToAllowAnimations(string avatar) { ProcessAvatar(avatar); @@ -29,6 +30,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Error with gesture")] [ReturnHints("Accepted")] [ArgHints("gesture", "What gesture to trigger", "UUID")] + [CmdTypeDo()] public object PlayGesture(string gesture) { if (UUID.TryParse(gesture, out UUID gestureUUID) == false) @@ -42,6 +44,7 @@ namespace SecondBotEvents.Commands [About("Resets the animation stack for the bot")] [ReturnHints("Accepted - X stopped animations")] + [CmdTypeDo()] public object ResetAnimations() { List animations = [.. GetClient().Self.SignaledAnimations.Copy().Keys]; diff --git a/SecondBotEvents/Commands/Avatars.cs b/SecondBotEvents/Commands/Avatars.cs index 3b2c0d5..0d294cd 100644 --- a/SecondBotEvents/Commands/Avatars.cs +++ b/SecondBotEvents/Commands/Avatars.cs @@ -18,6 +18,7 @@ namespace SecondBotEvents.Commands [ArgHints("store", "What type of request to accept", "Text", "GroupInvite", new string[] { "FriendRequest", "InventoryOffer", "GroupInvite", "Teleport" })] [ArgHints("avatar", "Who to accept the request from", "AVATAR")] [ArgHints("remove", "Should this remove the entry", "BOOL")] + [CmdTypeDo()] public Object AcceptNext(string store, string avatar, string remove) { ProcessAvatar(avatar); @@ -47,6 +48,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unknown store type")] [ArgHints("store", "What type of request to accept", "Text", "GroupInvite", new string[] { "FriendRequest", "InventoryOffer", "GroupInvite", "Teleport" })] [ArgHints("avatar", "Who to accept the request from", "AVATAR")] + [CmdTypeDo()] public Object IsOnAcceptNext(string store, string avatar) { ProcessAvatar(avatar); @@ -69,6 +71,7 @@ namespace SecondBotEvents.Commands [About("an improved version of near me with extra details
NearMeDetails is a object formated as follows
")] [ReturnHints("array NearMeDetails")] [ReturnHintsFailure("Error not in a sim")] + [CmdTypeGet()] public object NearmeWithDetails() { if (GetClient().Network.CurrentSim == null) @@ -101,6 +104,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild avatar uuid")] [ReturnHints("Requesting avatar details [Retry later]")] [ArgHints("avatar", "Who are we getting the profile image of", "AVATAR")] + [CmdTypeGet()] public object GetProfileImage(string avatar) { ProcessAvatar(avatar); @@ -121,6 +125,7 @@ namespace SecondBotEvents.Commands [ReturnHints("Requesting avatar details [Retry later]")] [ReturnHintsFailure("Invaild texture uuid")] [ArgHints("texture", "What texture to use", "UUID")] + [CmdTypeSet()] public object SetProfileImage(string texture) { if (UUID.TryParse(texture, out UUID textureUUID) == false) @@ -143,6 +148,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild avatar uuid")] [ReturnHints("Requesting avatar details [Retry later]")] [ArgHints("avatar", "Who are we getting the profile about of", "AVATAR")] + [CmdTypeGet()] public object GetProfileAbout(string avatar) { ProcessAvatar(avatar); @@ -164,6 +170,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("about text to short")] [ReturnHintsFailure("about text to long")] [ArgHints("abouttext", "text to use in the about me area, length 10 to 300", "Text", "Hello world!")] + [CmdTypeSet()] public object SetProfileAbout(string abouttext) { if(abouttext.Length < 10) @@ -190,6 +197,7 @@ namespace SecondBotEvents.Commands [About("returns a list of all known avatars nearby")] [ReturnHints("array UUID = Name")] [ReturnHintsFailure("Error not in a sim")] + [CmdTypeGet()] public object Nearme() { if (GetClient().Network.CurrentSim == null) @@ -213,6 +221,7 @@ namespace SecondBotEvents.Commands [ReturnHints("the name of the avatar")] [ReturnHints("lookup")] [ReturnHintsFailure("Not a vaild UUID")] + [CmdTypeDo()] public object Key2Name(string uuid) { UUID avUUID = UUID.Zero; @@ -228,6 +237,7 @@ namespace SecondBotEvents.Commands [ReturnHints("lookup")] [ReturnHintsFailure("Not a vaild name")] [ArgHints("name", "the name to find the uuid for", "Text", "Madpeter Zond")] + [CmdTypeDo()] public object Name2Key(string name) { if(name == null) diff --git a/SecondBotEvents/Commands/Chat.cs b/SecondBotEvents/Commands/Chat.cs index b0fec22..495b8b8 100644 --- a/SecondBotEvents/Commands/Chat.cs +++ b/SecondBotEvents/Commands/Chat.cs @@ -9,6 +9,7 @@ namespace SecondBotEvents.Commands { [About("fetchs the last localchat messages")] [ReturnHints("json encoded array")] + [CmdTypeGet()] public object LocalChatHistory() { return BasicReply(JsonConvert.SerializeObject(master.DataStoreService.GetLocalChat())); @@ -19,6 +20,7 @@ namespace SecondBotEvents.Commands [ArgHints("message", "the message to send", "Text", "Hi Mom im on TV")] [ReturnHints("array string")] [ReturnHintsFailure("Message empty")] + [CmdTypeDo()] public object Say(string channel, string message) { if (SecondbotHelpers.isempty(message) == true) @@ -39,6 +41,7 @@ namespace SecondBotEvents.Commands [ArgHints("message", "the message to send", "Text", "Hi Mom im on TV")] [ReturnHints("array string")] [ReturnHintsFailure("Message empty")] + [CmdTypeDo()] public object Shout(string channel, string message) { if (SecondbotHelpers.isempty(message) == true) @@ -59,6 +62,7 @@ namespace SecondBotEvents.Commands [ArgHints("message", "the message to send", "Text", "Hi Mom im on TV")] [ReturnHints("array string")] [ReturnHintsFailure("Message empty")] + [CmdTypeDo()] public object Whisper(string channel, string message) { if (SecondbotHelpers.isempty(message) == true) @@ -82,6 +86,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Message empty")] [ReturnHintsFailure("avatar lookup")] + [CmdTypeDo()] public object IM(string avatar, string message) { ProcessAvatar(avatar); @@ -100,6 +105,7 @@ namespace SecondBotEvents.Commands [About("gets a full list of all avatar chat windows")] [ReturnHints("array UUID = Name")] + [CmdTypeGet()] public object chatwindows() { return BasicReply(JsonConvert.SerializeObject(master.DataStoreService.GetAvatarImWindows())); @@ -107,6 +113,7 @@ namespace SecondBotEvents.Commands [About("gets a list of chat windows from avatars with unread messages")] [ReturnHints("array of UUID")] + [CmdTypeGet()] public object listwithunread() { return BasicReply(JsonConvert.SerializeObject(master.DataStoreService.GetAvatarImWindowsUnread())); @@ -114,6 +121,7 @@ namespace SecondBotEvents.Commands [About("gets if there are any unread im messages from avatars at all")] [ReturnHints("True|False")] + [CmdTypeGet()] public object haveunreadims() { return BasicReply(master.DataStoreService.GetAvatarImWindowsUnreadAny().ToString()); @@ -123,6 +131,7 @@ namespace SecondBotEvents.Commands [ArgHints("window", "avatar UUID you wish to view the chat from", "UUID")] [ReturnHintsFailure("avatar UUID invaild")] [ReturnHints("Array of text")] + [CmdTypeGet()] public object getimchat(string avatarid) { UUID avatarUUID = UUID.Zero; diff --git a/SecondBotEvents/Commands/Core.cs b/SecondBotEvents/Commands/Core.cs index 45889a5..b4ece4d 100644 --- a/SecondBotEvents/Commands/Core.cs +++ b/SecondBotEvents/Commands/Core.cs @@ -7,6 +7,7 @@ namespace SecondBotEvents.Commands { [About("Used to check connections")] [ReturnHints("world")] + [CmdTypeGet()] public object Hello() { return BasicReply("world"); diff --git a/SecondBotEvents/Commands/Dialogs.cs b/SecondBotEvents/Commands/Dialogs.cs index e7a5200..5f25769 100644 --- a/SecondBotEvents/Commands/Dialogs.cs +++ b/SecondBotEvents/Commands/Dialogs.cs @@ -13,6 +13,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("unable to find avatar")] [ReturnHintsFailure("looking up avatar please try again")] [ArgHints("avatar", "Who to send the dialog relay to", "AVATAR")] + [CmdTypeSet()] public object DialogRelayAvatarTarget(string avatar) { if(UUID.TryParse(avatar, out UUID avUUID) == false) @@ -36,6 +37,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("channel must be zero or more")] [ReturnHintsFailure("channel is not vaild")] [ArgHints("channel", "what channel number to send the reply to (must be zero or higher)","Number", "123")] + [CmdTypeSet()] public object DialogRelayChatTarget(string channel) { if (int.TryParse(channel, out int channelnum) == false) @@ -54,6 +56,7 @@ namespace SecondBotEvents.Commands [ReturnHints("removed")] [ReturnHintsFailure("url must start with http")] [ArgHints("url", "the URL to send the replys to","URL","http://mycoolsite.com/botdialog.php")] + [CmdTypeSet()] public object DialogRelayHttpTarget(string url) { if(url.StartsWith("http") == false) @@ -71,6 +74,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("bad dialog id")] [ArgHints("dialogid", "The ID for the dialog","Number","442")] [ArgHints("buttontext", "The button text to push","Text","Unlock")] + [CmdTypeDo()] public object DialogResponce(string dialogid, string buttontext) { if (int.TryParse(dialogid, out int dialogidnum) == false) diff --git a/SecondBotEvents/Commands/Discord.cs b/SecondBotEvents/Commands/Discord.cs index 6e007ea..829a113 100644 --- a/SecondBotEvents/Commands/Discord.cs +++ b/SecondBotEvents/Commands/Discord.cs @@ -14,6 +14,7 @@ namespace SecondBotEvents.Commands [ArgHints("serverid", "the server id to apply this action to","Number","1234555123")] [ArgHints("roleid", "the role id we are giving", "Number", "445442441")] [ArgHints("memberid", "who we are giving it to", "Number", "66522144")] + [CmdTypeSet()] public object Discord_AddRole(string serverid,string roleid,string memberid) { if (master.DiscordService.DiscordReady() == false) @@ -30,6 +31,7 @@ namespace SecondBotEvents.Commands [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("memberid", "who we are giving it to", "Number", "66522144")] [ArgHints("why", "why they are being banned", "Text", "Spammer")] + [CmdTypeDo()] public object Discord_BanMember(string serverid, string memberid, string why) { if (master.DiscordService.DiscordReady() == false) @@ -49,6 +51,7 @@ namespace SecondBotEvents.Commands [About("Gets the roles assigned to the selected member")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("memberid", "who we are giving it to", "Number", "66522144")] + [CmdTypeGet()] public object Discord_GetMemberRoles(string serverid, string memberid) { if (master.DiscordService.DiscordReady() == false) @@ -68,6 +71,7 @@ namespace SecondBotEvents.Commands [ReturnHints("true|false")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("memberid", "who we are giving it to", "Number", "66522144")] + [CmdTypeDo()] public object Discord_BulkClear_Messages(string serverid, string memberid) { if (master.DiscordService.DiscordReady() == false) @@ -83,6 +87,7 @@ namespace SecondBotEvents.Commands [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("memberid", "who we are giving it to", "Number", "66522144")] [ArgHints("message", "what we are sending", "Text", "Whats going on")] + [CmdTypeDo()] public object Discord_Dm_Member(string serverid, string memberid, string message) { if (master.DiscordService.DiscordReady() == false) @@ -98,6 +103,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Discord client not ready")] [ReturnHints("mixed array of userid: nickname|username or userid:username")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] + [CmdTypeGet()] public object Discord_MembersList(string serverid) { if (master.DiscordService.DiscordReady() == false) @@ -115,6 +121,7 @@ namespace SecondBotEvents.Commands [ArgHints("channelid", "the channel id to apply this action to", "Number", "552121543")] [ArgHints("tts", "shoud tts be enabled","BOOL")] [ArgHints("message", "what we are sending", "Text", "Hi everyone in channel")] + [CmdTypeDo()] public object Discord_MessageChannel(string serverid, string channelid, string tts, string message) { if (master.DiscordService.DiscordReady() == false) @@ -134,6 +141,7 @@ namespace SecondBotEvents.Commands [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("memberid", "who we are giving it to", "Number", "66522144")] [ArgHints("mode", "should we mute them", "BOOL")] + [CmdTypeDo()] public object Discord_MuteMember(string serverid, string memberid, string mode) { if (master.DiscordService.DiscordReady() == false) @@ -148,6 +156,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Discord client not ready")] [ArgHints("serverid", "the server id", "Number", "1234555123")] [ArgHints("roleid", "the role id", "Number", "66522144")] + [CmdTypeGet()] public object Discord_Role_GetSettings(string serverid, string roleid) { if (master.DiscordService.DiscordReady() == false) @@ -164,6 +173,7 @@ namespace SecondBotEvents.Commands [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("roleid", "the role id", "Number", "66522144")] [ArgHints("flagscsv", "what we are setting", "Text", "Speak=True,SendMessages=False")] + [CmdTypeSet()] public object Discord_Role_UpdatePerms(string serverid, string roleid, string flagscsv) { if (master.DiscordService.DiscordReady() == false) @@ -179,6 +189,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Discord client not ready")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] [ArgHints("role", "the name of the role we are creating", "Text", "Buyersclub")] + [CmdTypeDo()] public object Discord_RoleCreate(string serverid, string role) { if (master.DiscordService.DiscordReady() == false) @@ -192,6 +203,7 @@ namespace SecondBotEvents.Commands [ReturnHints("KeyPair of status: KeyPair of roleid: rolename")] [ReturnHintsFailure("Discord client not ready")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] + [CmdTypeGet()] public object Discord_RoleList(string serverid) { if (master.DiscordService.DiscordReady() == false) @@ -205,6 +217,7 @@ namespace SecondBotEvents.Commands [ReturnHints("true|false")] [ReturnHintsFailure("Discord client not ready")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] + [CmdTypeDo()] public object Discord_RoleRemove(string serverid, string roleid) { if (master.DiscordService.DiscordReady() == false) @@ -218,6 +231,7 @@ namespace SecondBotEvents.Commands [ReturnHints("array of channelid: name")] [ReturnHintsFailure("Discord client not ready")] [ArgHints("serverid", "the server id to apply this action to", "Number", "1234555123")] + [CmdTypeGet()] public object Discord_TextChannels_List(string serverid) { if (master.DiscordService.DiscordReady() == false) diff --git a/SecondBotEvents/Commands/Estate.cs b/SecondBotEvents/Commands/Estate.cs index 05d21d4..2bc1ce9 100644 --- a/SecondBotEvents/Commands/Estate.cs +++ b/SecondBotEvents/Commands/Estate.cs @@ -15,6 +15,7 @@ namespace SecondBotEvents.Commands [ArgHints("delay", "How long to delay the restart for (30 to 240 secs) - defaults to 240 if out of bounds \n" + "set to 0 if your canceling!", "Number", "60")] [ArgHints("mode", "true to start a restart, false to cancel", "BOOL")] + [CmdTypeDo()] public object SimRestart(string delay, string mode) { if (GetClient().Network.CurrentSim.IsEstateManager == false) @@ -41,6 +42,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Message empty")] [ReturnHints("ok")] [ArgHints("message", "What the message is", "Text", "Hi everyone I need to restart this sim")] + [CmdTypeDo()] public object SimMessage(string message) { if (SecondbotHelpers.notempty(message) == false) @@ -59,6 +61,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to find region")] [ReturnHints("Texture UUID")] [ArgHints("regionname", "the name of the region we are fetching", "Text", "Lostworld")] + [CmdTypeGet()] public object GetSimTexture(string regionname) { if (GetClient().Grid.GetGridRegion(regionname, GridLayerType.Objects, out GridRegion region) == false) @@ -71,6 +74,7 @@ namespace SecondBotEvents.Commands [About("Reclaims ownership of the current parcel")] [ReturnHintsFailure("Not an estate manager here")] [ReturnHints("ok")] + [CmdTypeDo()] public object EstateParcelReclaim() { if (GetClient().Network.CurrentSim.IsEstateManager == false) @@ -86,6 +90,7 @@ namespace SecondBotEvents.Commands [ArgHints("regionname", "the region we want", "Text", "Lostworld")] [ReturnHintsFailure("Unable to find region")] [ReturnHints("a json object with the x,y and region name")] + [CmdTypeGet()] public object GetSimGlobalPos(string regionname) { if (GetClient().Grid.GetGridRegion(regionname, GridLayerType.Objects, out GridRegion region) == false) @@ -103,6 +108,7 @@ namespace SecondBotEvents.Commands [About("Requests the estate banlist")] [ReturnHints("ban list json")] + [CmdTypeGet()] public object GetEstateBanList() { return BasicReply(JsonConvert.SerializeObject(master.DataStoreService.GetEstateBans())); @@ -117,7 +123,7 @@ namespace SecondBotEvents.Commands [ArgHints("avatar", "avatar you wish to ban", "AVATAR")] [ArgHints("mode", "What action would you like to take
Defaults to remove if not given \"add\"", "Text", "add", new string[] {"add","remove"})] [ArgHints("global", "if true this the ban/unban will be applyed to all estates the bot has access to", "BOOL")] - + [CmdTypeSet()] public object UpdateEstateBanlist(string avatar, string mode, string global) { if (GetClient().Network.CurrentSim.IsEstateManager == false) diff --git a/SecondBotEvents/Commands/Friends.cs b/SecondBotEvents/Commands/Friends.cs index 1345244..1789d1e 100644 --- a/SecondBotEvents/Commands/Friends.cs +++ b/SecondBotEvents/Commands/Friends.cs @@ -14,6 +14,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("not in friends list")] [ReturnHintsFailure("no map access or updating")] [ArgHints("avatar", "Who to get the location of","AVATAR")] + [CmdTypeGet()] public object FriendsGetLocation(string avatar) { ProcessAvatar(avatar); @@ -37,6 +38,7 @@ namespace SecondBotEvents.Commands [About("Gets the friendslist")] [ReturnHints("array of FriendListEntry")] + [CmdTypeGet()] public object Friendslist() { Dictionary FriendListCopy = GetClient().Friends.FriendList.Copy(); @@ -64,6 +66,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Not A friend")] [ReturnHintsFailure("state invaild")] [ReturnHintsFailure("avatar lookup")] + [CmdTypeSet()] public object FriendFullPerms(string avatar, string state) { ProcessAvatar(avatar); @@ -97,6 +100,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("avatar lookup")] [ArgHints("avatar", "Who to request/remove from friends list","AVATAR")] [ArgHints("state", "true: Send invite, false: Remove from friendslist","BOOL")] + [CmdTypeDo()] public object FriendRequest(string avatar, string state) { ProcessAvatar(avatar); diff --git a/SecondBotEvents/Commands/Funds.cs b/SecondBotEvents/Commands/Funds.cs index 022c3db..b97c5a0 100644 --- a/SecondBotEvents/Commands/Funds.cs +++ b/SecondBotEvents/Commands/Funds.cs @@ -10,6 +10,7 @@ namespace SecondBotEvents.Commands [About("Requests the current balance and requests the balance to update.")] [ReturnHints("Current fund level")] [ReturnHintsFailure("Funds commands are disabled")] + [CmdTypeGet()] public object Balance() { if (master.CommandsService.myConfig.GetAllowFundsCommands() == false) @@ -28,6 +29,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Transfer funds to avatars disabled")] [ArgHints("avatar", "Who to pay", "AVATAR")] [ArgHints("amount", "the amount to pay (from 1 to current balance)", "Number", "442")] + [CmdTypeDo()] public object PayAvatar(string avatar, string amount) { if (master.CommandsService.myConfig.GetAllowFundsCommands() == false) @@ -62,6 +64,7 @@ namespace SecondBotEvents.Commands [ArgHints("object", "Object to pay","UUID")] [ArgHints("primname", "The name of the prim on the object to pay","Text","MyBank")] [ArgHints("amount", "the amount to pay (from 1 to current balance)","Number","312")] + [CmdTypeDo()] public object PayObject(string objectuuid,string primname,string amount) { if (master.CommandsService.myConfig.GetAllowFundsCommands() == false) diff --git a/SecondBotEvents/Commands/Group.cs b/SecondBotEvents/Commands/Group.cs index 2b0ddf8..f7aab8a 100644 --- a/SecondBotEvents/Commands/Group.cs +++ b/SecondBotEvents/Commands/Group.cs @@ -16,6 +16,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("avatar lookup")] [ArgHints("group", "What group to check","UUID")] [ArgHints("avatar", "The avatar in check","AVATAR")] + [CmdTypeGet()] public object IsGroupMember(string group, string avatar) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -33,6 +34,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild group UUID")] [ReturnHintsFailure("avatar lookup")] [ArgHints("group", "the group to get members list from","UUID")] + [CmdTypeGet()] public object GetGroupMembers(string group) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -52,6 +54,7 @@ namespace SecondBotEvents.Commands [ArgHints("group", "the group to apply the ban in","UUID")] [ArgHints("avatar", "the avatar to ban/unban","AVATAR")] [ArgHints("state", "true to ban false to unban","BOOL")] + [CmdTypeDo()] public object GroupBan(string group, string avatar, string state) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -92,6 +95,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Missing group Eject power")] [ArgHints("group", "the group to eject from", "UUID")] [ArgHints("avatar", "the avatar to remove from the group", "UUID")] + [CmdTypeDo()] public object GroupEject(string group, string avatar) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -122,6 +126,7 @@ namespace SecondBotEvents.Commands [ArgHints("group", "the group to give the avatar the new role for","UUID")] [ArgHints("avatar", "the avatar to give the role to", "AVATAR")] [ArgHints("role", "the role to give the avatar in the group", "UUID")] + [CmdTypeSet()] public object GroupAddRole(string group, string avatar, string role) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -157,6 +162,7 @@ namespace SecondBotEvents.Commands [ArgHints("group", "the group to invite to","UUID")] [ArgHints("avatar", "the avatar you wish to invite","AVATAR")] [ArgHints("role", "the role to invite them with or \"everyone\" to give the default role","UUID","everyone")] + [CmdTypeDo()] public object GroupInvite(string group, string avatar, string role) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -198,6 +204,7 @@ namespace SecondBotEvents.Commands [ArgHints("group", "the group to send the notice to", "UUID")] [ArgHints("title", "The title of the group notice", "Text", "New releases")] [ArgHints("message", "The body of the group notice", "Text", "We have 4 new items in store with 5% off for the first hour!")] + [CmdTypeDo()] public object Groupnotice(string group, string title, string message) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -233,6 +240,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild role UUID")] [ArgHints("group", "the group to get the role from", "UUID")] [ArgHints("role", "the role to fetch the title from", "UUID")] + [CmdTypeDo()] public object GroupActiveTitle(string group, string role) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -256,6 +264,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unknown group")] [ReturnHintsFailure("Invaild group UUID")] [ArgHints("group", "the group to set as active", "UUID")] + [CmdTypeGet()] public object GroupActiveGroup(string group) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -282,6 +291,7 @@ namespace SecondBotEvents.Commands [ArgHints("title", "The title of the group notice","Text","Update to terms for rentals")] [ArgHints("message", "The body of the group notice","Text", "Hi everyone there has been a TOS update please check and review")] [ArgHints("attachment", "the inventory to send", "UUID")] + [CmdTypeDo()] public object GroupnoticeWithAttachment(string group, string title, string message, string attachment) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -318,6 +328,7 @@ namespace SecondBotEvents.Commands [About("fetchs a list of all groups known to the bot")] [ReturnHints("array UUID=name")] + [CmdTypeGet()] public object GetGroupList() { return BasicReply(JsonConvert.SerializeObject(master.DataStoreService.GetGroups())); @@ -325,6 +336,7 @@ namespace SecondBotEvents.Commands [About("Forces the bot to reload the groups list")] [ReturnHints("Working on it")] + [CmdTypeDo()] public object ForceLoadGroups() { master.BotClient.client.Groups.RequestCurrentGroups(); @@ -337,6 +349,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild group UUID")] [ReturnHintsFailure("Updating")] [ArgHints("group", "the group to get roles from", "UUID")] + [CmdTypeGet()] public object GetGroupRoles(string group) { if (UUID.TryParse(group, out UUID groupuuid) == false) @@ -352,6 +365,7 @@ namespace SecondBotEvents.Commands [About("fetchs a list of all groups with unread messages")] [ReturnHints("array UUID")] + [CmdTypeGet()] public object GroupchatListAllUnreadGroups() { return BasicReply(JsonConvert.SerializeObject(master.DataStoreService.GetAllGroupsChatWithUnread())); @@ -362,6 +376,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unknown group")] [ReturnHintsFailure("group value is invaild")] [ArgHints("group", "the group to check if it has any unread messages", "UUID")] + [CmdTypeGet()] public object GroupchatGroupHasUnread(string group) { if(UUID.TryParse(group,out UUID groupUUID) == false) @@ -378,6 +393,7 @@ namespace SecondBotEvents.Commands [About("checks if there are any groups with unread messages")] [ReturnHints("True|False")] + [CmdTypeGet()] public object GroupchatAnyUnread() { return BasicReply(master.DataStoreService.GetGroupChatHasAnyUnread().ToString()); @@ -385,6 +401,7 @@ namespace SecondBotEvents.Commands [About("Clears all group chat buffers at once")] [ReturnHints("ok")] + [CmdTypeSet()] public object GroupchatClearAll() { master.DataStoreService.ClearGroupChat(); @@ -395,6 +412,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Group UUID invaild")] [ReturnHints("Group Chat")] [ArgHints("group", "what group to get the chat history of","UUID")] + [CmdTypeGet()] public object GroupchatHistory(string group) { if (UUID.TryParse(group, out UUID groupUUID) == false) @@ -410,6 +428,7 @@ namespace SecondBotEvents.Commands [ReturnHints("Sending")] [ReturnHintsFailure("Group UUID invaild")] [ReturnHintsFailure("Unknown group")] + [CmdTypeDo()] public object Groupchat(string group, string message) { if (UUID.TryParse(group, out UUID groupUUID) == false) diff --git a/SecondBotEvents/Commands/Info.cs b/SecondBotEvents/Commands/Info.cs index a34388d..8ce204c 100644 --- a/SecondBotEvents/Commands/Info.cs +++ b/SecondBotEvents/Commands/Info.cs @@ -11,6 +11,7 @@ namespace SecondBotEvents.Commands { [About("Lists objects that are sculpty type in the current sim that the bot can see")] [ReturnHints("A json object")] + [CmdTypeGet()] public object ListSculptys() { Dictionary objects_copy = GetClient().Network.CurrentSim.ObjectsPrimitives.Copy(); @@ -71,6 +72,7 @@ namespace SecondBotEvents.Commands [About("Fetchs the current bot")] [ReturnHints("The build ID of the bot")] + [CmdTypeGet()] public object Version() { return BasicReply(master.GetVersion()); @@ -79,6 +81,7 @@ namespace SecondBotEvents.Commands [About("Fetchs the name of the bot")] [ReturnHints("Firstname Lastname")] + [CmdTypeGet()] public object Name() { return BasicReply(GetClient().Self.FirstName + " " + GetClient().Self.LastName); @@ -88,6 +91,7 @@ namespace SecondBotEvents.Commands [ReturnHints("Parcelname")] [ReturnHintsFailure("Error parcel not found")] [ReturnHintsFailure("Error not in a sim")] + [CmdTypeGet()] public object ParcelName() { if (GetClient().Network.CurrentSim == null) @@ -104,6 +108,7 @@ namespace SecondBotEvents.Commands [About("Requests the current unixtime at the bot")] [ReturnHints("Unixtime")] + [CmdTypeGet()] public object UnixTimeNow() { return BasicReply(SecondbotHelpers.UnixTimeNow().ToString()); @@ -112,6 +117,7 @@ namespace SecondBotEvents.Commands [About("Fetchs the current region name")] [ReturnHints("Regionname")] [ReturnHintsFailure("Error not in a sim")] + [CmdTypeGet()] public object SimName() { if (GetClient().Network.CurrentSim == null) @@ -124,6 +130,7 @@ namespace SecondBotEvents.Commands [About("Fetchs the current location of the bot")] [ReturnHints("array of X,Y,Z values")] [ReturnHintsFailure("Error not in a sim")] + [CmdTypeGet()] public object GetPosition() { if (GetClient().Network.CurrentSim == null) diff --git a/SecondBotEvents/Commands/Inventory.cs b/SecondBotEvents/Commands/Inventory.cs index 8d30f4f..a2db6b1 100644 --- a/SecondBotEvents/Commands/Inventory.cs +++ b/SecondBotEvents/Commands/Inventory.cs @@ -23,6 +23,7 @@ namespace SecondBotEvents.Commands [ArgHints("inventoryType", "What type to watch for", "Text", "texture", new string[] { "texture","sound","callcard","landmark","clothing", "object","notecard","lsltext","lslbyte","animation","gesture","mesh" })] [ArgHints("outputTarget", "Where to send the updates to", "SMART")] + [CmdTypeSet()] public object SetInventoryUpdate(string inventoryType, string outputTarget) { if (master.EventsService.isRunning() == true) @@ -37,6 +38,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ArgHints("sourcePath", "accepts a file path to a wave PCM file @ 44100", "FILE")] [ArgHints("inventoryName", "the name in secondlife", "Text", "mycoolsound")] + [CmdTypeDo()] public object UploadMediaWave(string sourcePath, string inventoryName) { byte[] audioData = File.ReadAllBytes(sourcePath); @@ -78,6 +80,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] [ArgHints("item", "What to rez", "UUID")] + [CmdTypeDo()] public object RezObject(string item) { if (UUID.TryParse(item, out UUID targetitem) == false) @@ -122,6 +125,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Z offset must be between -2 and 2")] [ArgHints("item", "what to rez", "UUID")] [ArgHints("zoffset", "Z offset to apply (range -2 to 2)", "Number", "0.5")] + [CmdTypeDo()] public object RezObjectParcelCenter(string item, string zoffset) { if (UUID.TryParse(item, out UUID targetitem) == false) @@ -176,6 +180,7 @@ namespace SecondBotEvents.Commands [ArgHints("x", "X cord to rez at", "Number", "123")] [ArgHints("y", "Y cord to rez at", "Number", "45")] [ArgHints("z", "Z cord to rez at", "Number", "26")] + [CmdTypeDo()] public object RezObjectOnPos(string item, string x, string y, string z) { if (UUID.TryParse(item, out UUID targetitem) == false) @@ -230,6 +235,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to find inventory item")] [ArgHints("item", "item/folder to name", "UUID")] [ArgHints("newname", "What we are changing it to", "Text", "Better name")] + [CmdTypeSet()] public object RenameInventory(string item, string newname) { if (UUID.TryParse(item, out UUID target) == false) @@ -254,6 +260,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("invaild item uuid")] [ArgHints("item", "what item are we Deleting", "UUID")] + [CmdTypeSet()] public object DeleteInventoryItem(string item) { if (UUID.TryParse(item, out UUID target) == false) @@ -268,6 +275,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("invaild folder uuid")] [ArgHints("folder", "what folder are we removing", "UUID")] + [CmdTypeSet()] public object DeleteInventoryFolder(string folder) { if (UUID.TryParse(folder, out UUID target) == false) @@ -282,6 +290,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("invaild item uuid")] [ArgHints("item", "what item are we attaching", "UUID")] + [CmdTypeDo()] public object Attach(string item) { if (UUID.TryParse(item, out UUID itemuuid) == false) @@ -298,6 +307,7 @@ namespace SecondBotEvents.Commands [ReturnHints("okMulti")] [ReturnHintsFailure("invaild item uuid pr invaild attach point")] [ArgHints("item", "UUID of item, or the attach point, or * to remove everything", "Text", "Left Hand")] + [CmdTypeDo()] public object Detach(string item) { if (UUID.TryParse(item, out UUID itemuuid) == false) @@ -335,6 +345,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("invaild folder uuid")] [ReturnHintsFailure("target folder is empty or so full I cant get it in 5 secs...")] [ArgHints("folder", "what folder are we swapping to", "UUID")] + [CmdTypeDo()] public object SwapOutfit(string folder) { UUID folderUUID = UUID.Zero; @@ -366,6 +377,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Cant find target folder")] [ReturnHintsFailure("target folder is empty or so full I cant get it in 5 secs...")] [ArgHints("name", "Name of the folder", "Text", "My other outfit")] + [CmdTypeDo()] public object Outfit(string name) { if (SecondbotHelpers.notempty(name) == false) @@ -425,6 +437,7 @@ namespace SecondBotEvents.Commands [About("Searchs the notecards folder for notecards, any older than 31 days are deleted.
Depending on the number of notecards this might require multiple calls!")] [ReturnHints("ok")] [ReturnHintsFailure("Unable to find notecard folder")] + [CmdTypeDo()] public object InventoryPurgeNotecards() { List T = GetClient().Inventory.Store.GetContents(GetClient().Inventory.Store.RootFolder); @@ -466,6 +479,7 @@ namespace SecondBotEvents.Commands [ReturnHints("Asset UUID or UUID zero")] [ReturnHintsFailure("Invaild item uuid")] [ArgHints("item", "inventory level item", "UUID")] + [CmdTypeGet()] public object GetRealUUID(string item) { if (UUID.TryParse(item, out UUID itemUUID) == false) @@ -483,6 +497,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to find item")] [ArgHints("path", "item path and name", "Text", "Objects/DemoItem")] [ArgHints("avatar", "Who we are sending it to", "AVATAR")] + [CmdTypeDo()] public object SendItemByPath(string path, string avatar) { ProcessAvatar(avatar); @@ -512,6 +527,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to find item")] [ArgHints("item", "what are we sending", "UUID")] [ArgHints("avatar", "Who are we sending it to", "AVATAR")] + [CmdTypeDo()] public object SendItem(string item, string avatar) { ProcessAvatar(avatar); @@ -542,6 +558,7 @@ namespace SecondBotEvents.Commands new string[] { "texture", "sound", "callcard", "landmark", "lsltext", "clothing", "object", "notecard", "animatn", "gesture", "mesh", "material" })] [ArgHints("avatar", "Who are we sending it to","AVATAR")] + [CmdTypeDo()] public object SendItemDirect(string itemuuid, string itemname, string itemtype, string avatar) { if (UUID.TryParse(itemuuid, out UUID targetitem) == false) @@ -585,6 +602,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to find folder")] [ArgHints("path", "path to the folder from root","Text","Objects/MyFolderToSend")] [ArgHints("avatar", "Who are we sending it to","AVATAR")] + [CmdTypeDo()] public object SendFolderByPath(string path, string avatar) { ProcessAvatar(avatar); @@ -610,6 +628,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to find folder")] [ArgHints("item", "what folder are we sending","UUID")] [ArgHints("avatar", "Who are we sending it to", "AVATAR")] + [CmdTypeDo()] public object SendFolder(string folder, string avatar) { ProcessAvatar(avatar); @@ -641,6 +660,7 @@ namespace SecondBotEvents.Commands [ArgHints("item", "what are we sending","UUID")] [ArgHints("object", "were are we sending it","UUID")] [ArgHints("running", "should it be running","BOOL")] + [CmdTypeDo()] public object TransferInventoryToObject(string item, string objectuuid, string running) { if (UUID.TryParse(item, out UUID itemuuid) == false) @@ -701,6 +721,7 @@ namespace SecondBotEvents.Commands [About("Requests the inventory folder layout as a json object InventoryMapFolder
Formated as follows
InventoryMapItem
  • id: UUID
  • name: String
  • subfolders: InventoryMapFolder[]
")] [ReturnHints("array of InventoryMapFolder")] [ReturnHintsFailure("Error")] + [CmdTypeGet()] public object InventoryFolders() { string reply = HelperInventory.MapFolderJson(GetClient()); @@ -712,6 +733,7 @@ namespace SecondBotEvents.Commands [ArgHints("targetfolder", "the folder to look up","UUID")] [ReturnHints("single InventoryMapFolder")] [ReturnHintsFailure("Error")] + [CmdTypeGet()] public object InventoryFoldersLimited(string targetfolder) { string reply = HelperInventory.MapFolderJson(GetClient(), targetfolder,false); @@ -723,6 +745,7 @@ namespace SecondBotEvents.Commands [ReturnHints("array of InventoryMapItem")] [ReturnHintsFailure("Invaild folder UUID")] [ArgHints("folderUUID", "the folder to fetch (Found via: inventory/folders)","UUID")] + [CmdTypeGet()] public object InventoryContents(string folderUUID) { if (UUID.TryParse(folderUUID, out UUID folder) == false) @@ -738,6 +761,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("new folder name is too short, must be longer than 3 characters.")] [ArgHints("parentFolder", "folder to create a subfolder in","UUID")] [ArgHints("folderName", "name of the new folder","Text","MyNewFolder")] + [CmdTypeSet()] public object CreateInventoryFolder(string parentFolder, string folderName) { if (UUID.TryParse(parentFolder, out UUID parentFolderUUID) == false) @@ -760,6 +784,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("invaild folder uuid")] [ArgHints("item", " item to move", "UUID")] [ArgHints("folder", "destination folder", "UUID")] + [CmdTypeDo()] public object MoveInventoryItem(string item, string folder) { if (UUID.TryParse(item, out UUID itemUUID) == false) @@ -780,6 +805,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("invaild dest folder uuid")] [ArgHints("sourceFolder", "folder to move", "UUID")] [ArgHints("destFolder", "destination folder", "UUID")] + [CmdTypeDo()] public object MoveInventoryFolder(string sourceFolder, string destFolder) { if (UUID.TryParse(sourceFolder, out UUID sourceFolderUUID) == false) diff --git a/SecondBotEvents/Commands/Movement.cs b/SecondBotEvents/Commands/Movement.cs index d1b5e94..18a615e 100644 --- a/SecondBotEvents/Commands/Movement.cs +++ b/SecondBotEvents/Commands/Movement.cs @@ -15,6 +15,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Convert to float has failed")] [ReturnHintsFailure("value out of range (-2.0, 2.0)")] [ArgHints("height", "what height to hover at from (-2.0, 2.0)","Number","0.5")] + [CmdTypeSet()] public object HoverHeight(string height) { if (double.TryParse(height, out double level) == false) @@ -37,6 +38,7 @@ namespace SecondBotEvents.Commands [ArgHints("x", "X location to AutoPilot to","Number","44")] [ArgHints("y", "Y location to AutoPilot to","Number","78")] [ArgHints("z", "Z location to AutoPilot to","Number","26")] + [CmdTypeDo()] public object AutoPilot(string x, string y, string z) { if (Vector3.TryParse("<" + x + "," + y + "," + z + ">", out Vector3 pos) == false) @@ -65,6 +67,7 @@ namespace SecondBotEvents.Commands [About("Stop the auto pilot system from walking")] [ReturnHints("ok")] + [CmdTypeDo()] public object AutoPilotStop() { GetClient().Self.AutoPilotCancel(); @@ -75,6 +78,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Invaild avatar UUID")] [ArgHints("avatar", "Who to send the join me via teleport to","AVATAR")] + [CmdTypeDo()] public object SendTeleportLure(string avatar) { ProcessAvatar(avatar); @@ -90,6 +94,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Invaild avatar UUID")] [ArgHints("avatar", "Who to request a teleport from","AVATAR")] + [CmdTypeDo()] public object RequestTeleport(string avatar) { ProcessAvatar(avatar); @@ -106,6 +111,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Invaild mode")] [ArgHints("mode", "true: Start flying, false: stop flying (super fun at height)","BOOL")] + [CmdTypeSet()] public object Fly(string mode) { if (bool.TryParse(mode, out bool flymode) == false) @@ -122,6 +128,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild vector")] [ReturnHintsFailure("Vector ? value is out of range 0-?")] [ArgHints("vector", "What direction to face","Vector", "<123,45,44>")] + [CmdTypeSet()] public object RotateToFaceVector(string vector) { if (Vector3.TryParse(vector, out Vector3 pos) == false) @@ -148,6 +155,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild avatar UUID")] [ReturnHintsFailure("Unable to see avatar")] [ArgHints("avatar", "Who to turn to look at","AVATAR")] + [CmdTypeSet()] public object RotateToFace(string avatar) { ProcessAvatar(avatar); @@ -166,6 +174,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Unable to process rotation")] [ArgHints("deg", "0 to 360","Number","180")] + [CmdTypeSet()] public object RotateTo(string deg) { if (float.TryParse(deg, out float target_yaw) == true) @@ -205,6 +214,7 @@ namespace SecondBotEvents.Commands [ArgHints("x", "X location to teleport to","Number","55")] [ArgHints("y", "y location to teleport to","Number","78")] [ArgHints("z", "z location to teleport to","Number","244")] + [CmdTypeDo()] public object Teleport(string region, string x, string y, string z) { bool status = TeleportRequest(region+"/"+x+"/"+y+"/"+z); @@ -220,6 +230,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("slurl is empty")] [ReturnHints("True|False")] [ArgHints("slurl", "a full SLurl","Text", "secondlife://Example%20Land/115/130/24")] + [CmdTypeDo()] public object TeleportSLURL(string slurl) { if (SecondbotHelpers.notempty(slurl) == false) diff --git a/SecondBotEvents/Commands/Notecard.cs b/SecondBotEvents/Commands/Notecard.cs index 44c8640..ad87980 100644 --- a/SecondBotEvents/Commands/Notecard.cs +++ b/SecondBotEvents/Commands/Notecard.cs @@ -17,6 +17,7 @@ namespace SecondBotEvents.Commands [ReturnHints("Making request to get data from notecard")] [ArgHints("notecardInventoryUUID", "What notecard to read","UUID")] [ArgHints("replytarget", "Were to send the reply","SMART")] + [CmdTypeGet()] public object NotecardRead(string notecardInventoryUUID, string replytarget) { if(SecondbotHelpers.isempty(replytarget) == true) @@ -89,6 +90,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ArgHints("collection", "The name of the collection","Text","StorageMeme")] [ArgHints("content", "The text to add to the collection","Text","Add this line \n Please and thanks")] + [CmdTypeSet()] public object NotecardAdd(string collection, string content) { if (SecondbotHelpers.notempty(collection) == false) @@ -107,6 +109,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Collection value is empty")] [ReturnHints("ok")] [ArgHints("collection", "The name of the collection", "Text", "StorageMeme")] + [CmdTypeSet()] public object NotecardClear(string collection) { if (SecondbotHelpers.notempty(collection) == false) @@ -126,6 +129,7 @@ namespace SecondBotEvents.Commands [ArgHints("avatar", "Who to send it to","AVATAR")] [ArgHints("collection", "The name of the collection", "Text", "StorageMeme")] [ArgHints("notecardname", "What to call the created notecard","Text", "My custom notecard")] + [CmdTypeDo()] public object NotecardSend(string avatar, string collection, string notecardname) { if (SecondbotHelpers.notempty(collection) == false) @@ -163,6 +167,7 @@ namespace SecondBotEvents.Commands [ArgHints("avatar", "Who to send the notecard to","AVATAR")] [ArgHints("content", "What to put in the notecard","Text","I am in a notecard")] [ArgHints("notecardname", "Whats the name of the notecard","Text","Custom notecard")] + [CmdTypeDo()] public object NotecardDirectSend(string avatar, string content, string notecardname) { if (SecondbotHelpers.notempty(notecardname) == false) diff --git a/SecondBotEvents/Commands/ParcelCommands.cs b/SecondBotEvents/Commands/ParcelCommands.cs index f53acf9..cab9019 100644 --- a/SecondBotEvents/Commands/ParcelCommands.cs +++ b/SecondBotEvents/Commands/ParcelCommands.cs @@ -38,6 +38,7 @@ namespace SecondBotEvents.Commands [ReturnHints("parcel local id (int)")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetCurrentParcelId() { KeyValuePair tests = SetupCurrentParcel(); @@ -50,13 +51,16 @@ namespace SecondBotEvents.Commands [About("Requests the bot update its list of parcels ready for other commands")] [ReturnHints("ok")] + [CmdTypeDo()] public object UpdateListOfParcels() { GetClient().Parcels.RequestAllSimParcels(GetClient().Network.CurrentSim); return BasicReply("ok"); } + [About("Requests a packet blob for the parcels snapshot data")] [ReturnHints("json encoded object")] + [CmdTypeGet()] public object GetParcelListSnapshots() { Dictionary reply = []; @@ -72,6 +76,7 @@ namespace SecondBotEvents.Commands [ReturnHints("width,height as a csv")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetCurrentParcelSize() { KeyValuePair tests = SetupCurrentParcel(); @@ -88,6 +93,7 @@ namespace SecondBotEvents.Commands [About("requests the parcel layout as a SVG\n call UpdateListOfParcels first to update list before calling")] [ReturnHints("json encoded svg")] + [CmdTypeGet()] public object GetSimParcelLayers() { Dictionary data = GetClient().Network.CurrentSim.Parcels.Copy(); @@ -177,6 +183,7 @@ namespace SecondBotEvents.Commands [About("Requests a packet blob for the parcels in the current sim\n call UpdateListOfParcels first to update list before calling")] [ReturnHints("json encoded object")] + [CmdTypeGet()] public object GetListOfParcels() { ParcelPacketReply reply = new(); @@ -208,6 +215,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeDo()] public object CancelParcelSale() { KeyValuePair tests = SetupCurrentParcel(); @@ -228,6 +236,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild amount")] [ArgHints("amount", "The amount to sell the parcel for from 1 to 9999999, can be zero if avatar is assigned.", "Number", "4323")] [ArgHints("avatar", "Who to sell the parcel to or \"none\" to allow anyone", "AVATAR")] + [CmdTypeSet()] public object SetParcelSale(string amount, string avatar) { KeyValuePair tests = SetupCurrentParcel(); @@ -268,6 +277,7 @@ namespace SecondBotEvents.Commands [ReturnHints("traffic value")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetParcelTraffic() { KeyValuePair tests = SetupCurrentParcel(); @@ -282,6 +292,7 @@ namespace SecondBotEvents.Commands [ReturnHints("json object with sale amount and target for sale")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetParcelSaleDetails() { KeyValuePair tests = SetupCurrentParcel(); @@ -313,7 +324,7 @@ namespace SecondBotEvents.Commands [ArgHints("filterArea", "the max area to get results for: a number greater than or equal to zero","Number","65")] [ArgHints("pageNum", "the page to load from (starting at zero): a number greater than or equal to zero","Number","0")] [ArgHints("timeout", "how long to wait for results: a number greater in the range 2000 to 7000","Number","2000")] - + [CmdTypeGet()] public object QueryLandSaleData(string filterRegion,string filterPrice, string filterArea, string pageNum, string timeout) { if (Enum.TryParse(filterRegion, out DirectoryManager.SearchTypeFlags filterRegionType) == false) @@ -388,6 +399,7 @@ namespace SecondBotEvents.Commands [ArgHints("x", "X point for landing","Number","129")] [ArgHints("y", "Y point for landing","Number","32")] [ArgHints("z", "Z point for landing","Number","11")] + [CmdTypeSet()] public object SetParcelLandingZone(string x, string y, string z) { KeyValuePair tests = SetupCurrentParcel(); @@ -420,6 +432,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Parcel data not ready")] [ReturnHintsFailure("Parcel name is empty")] [ArgHints("name", "The new name of the parcel","Text","My Home")] + [CmdTypeSet()] public object SetParcelName(string name) { KeyValuePair tests = SetupCurrentParcel(); @@ -441,6 +454,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] [ArgHints("desc", "The new desc of the parcel","Text","All are invited")] + [CmdTypeSet()] public object SetParcelDesc(string desc) { KeyValuePair tests = SetupCurrentParcel(); @@ -457,6 +471,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetParcelDesc() { KeyValuePair tests = SetupCurrentParcel(); @@ -471,6 +486,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetParcelFlags() { KeyValuePair tests = SetupCurrentParcel(); @@ -491,6 +507,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Invaild avatar")] [ArgHints("avatar", "Who to eject from the parcel","AVATAR")] + [CmdTypeDo()] public object ParcelEject(string avatar) { ProcessAvatar(avatar); @@ -504,6 +521,7 @@ namespace SecondBotEvents.Commands [About("Abandons the parcel the bot is currently on, returning it to Linden's or Estate owner")] [ReturnHints("ok")] + [CmdTypeDo()] public object AbandonLand() { KeyValuePair tests = SetupCurrentParcel(); @@ -523,6 +541,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild avatar")] [ReturnHintsFailure("Avatar is in the blacklist")] [ArgHints("avatar", "Who to ban from the parcel","AVATAR")] + [CmdTypeDo()] public object ParcelBan(string avatar) { KeyValuePair tests = SetupCurrentParcel(); @@ -566,6 +585,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild avatar")] [ReturnHintsFailure("Avatar is already unbanned")] [ArgHints("avatar", "Who to unban from the parcel","AVATAR")] + [CmdTypeDo()] public object ParcelUnBan(string avatar) { KeyValuePair tests = SetupCurrentParcel(); @@ -609,6 +629,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild avatar")] [ReturnHints("ok")] [ArgHints("avatar", "who to return all objects on parcel", "AVATAR")] + [CmdTypeDo()] public object ReturnAllObjectsOnParcelByOwner(string avatar) { KeyValuePair tests = SetupCurrentParcel(); @@ -632,6 +653,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("No objects found to return")] [ReturnHintsFailure("Timeout waiting for object owners reply")] [ReturnHints("ok")] + [CmdTypeDo()] public object ReturnAllObjectsOnParcel() { KeyValuePair tests = SetupCurrentParcel(); @@ -724,6 +746,7 @@ namespace SecondBotEvents.Commands [ReturnHints("a json object with prim counts")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetParcelPrimCounts() { KeyValuePair tests = SetupCurrentParcel(); @@ -748,6 +771,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to process grouponly value")] [ArgHints("everyone", "can everyone trigger audio on this parcel", "BOOL")] [ArgHints("grouponly", "can everyone trigger audio on this parcel", "BOOL")] + [CmdTypeSet()] public object SetParcelAudioControls(string everyone,string grouponly) { KeyValuePair tests = SetupCurrentParcel(); @@ -778,6 +802,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] [ArgHints("musicurl", "the URL to set for streaming audio", "URL","http://podcast.mysite.com")] + [CmdTypeSet()] public object SetParcelMusic(string musicurl) { KeyValuePair tests = SetupCurrentParcel(); @@ -799,6 +824,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Flag: ? is unknown")] [ReturnHintsFailure("Flag: ? missing \"=\"")] [ArgHints("escapedflagdata", "repeatable flag data split by ::: formated Flag=True|False","Text","")] + [CmdTypeSet()] public object SetParcelFlag(string escapedflagdata) { KeyValuePair tests = SetupCurrentParcel(); @@ -857,6 +883,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Parcel data not ready")] [ReturnHintsFailure("Invaild group uuid")] [ReturnHintsFailure("Not in group")] + [CmdTypeDo()] public object ParcelDeedToGroup(string group) { KeyValuePair tests = SetupCurrentParcel(); @@ -891,6 +918,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild amount")] [ArgHints("amount", "amount to pay for the parcel (min 1, unless the land is set to the bot as the locked buyer then its 0)", "Number","1234")] + [CmdTypeDo()] public object ParcelBuy(string amount) { KeyValuePair tests = SetupCurrentParcel(); @@ -933,6 +961,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Parcel data not ready")] [ReturnHintsFailure("Invaild texture uuid")] [ArgHints("texture", "The texture uuid to set as the snapshot", "UUID")] + [CmdTypeSet()] public object SetParcelSnapshot(string texture) { KeyValuePair tests = SetupCurrentParcel(); @@ -955,6 +984,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild state")] [ArgHints("avatar", "Who to freeze","AVATAR")] [ArgHints("state", "setting state to false will unfreeze or true to freeze","BOOL")] + [CmdTypeDo()] public object ParcelFreeze(string avatar, string state) { if (bool.TryParse(state, out bool freezestate) == false) @@ -975,6 +1005,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("json object: GetParcelBanlistObject")] [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] + [CmdTypeGet()] public object GetParcelBanlist() { KeyValuePair tests = SetupCurrentParcel(); @@ -1017,6 +1048,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild object uuid")] [ReturnHintsFailure("Unable to find object")] [ArgHints("objectuuid", "object UUID to unrez")] + [CmdTypeDo()] public object UnRezObject(string objectuuid) { if (UUID.TryParse(objectuuid, out UUID targetobject) == false) @@ -1055,6 +1087,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Error not in a sim")] [ReturnHintsFailure("Parcel data not ready")] [ArgHints("escapedflagdata", "repeatable flag data split by ::: formated Flag=Value","TEXT", "MediaDesc=lol what:::MediaAutoScale=True:::MediaLoop=False")] + [CmdTypeSet()] public object ParcelSetMedia(string escapedflagdata) { KeyValuePair tests = SetupCurrentParcel(); diff --git a/SecondBotEvents/Commands/Self.cs b/SecondBotEvents/Commands/Self.cs index 6216a57..0d9cb4b 100644 --- a/SecondBotEvents/Commands/Self.cs +++ b/SecondBotEvents/Commands/Self.cs @@ -18,6 +18,7 @@ namespace SecondBotEvents.Commands [ArgHints("to", "the email addres to send to", "Text", "me@email.com")] [ArgHints("subject", "the subject of the email", "Text", "This is the subject")] [ArgHints("body", "the contents of the email", "Text", "Email is fun")] + [CmdTypeDo()] public object SendEmail(string to, string subject, string body) { if (SecondbotHelpers.isempty(to) == true) { @@ -41,6 +42,7 @@ namespace SecondBotEvents.Commands [About("Makes the bot teleport to its home region")] [ReturnHints("ok")] + [CmdTypeDo()] public object GoHome() { master.HomeboundService.GoHome(); @@ -51,6 +53,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ArgHints("targetUUID", "The avatar to point at", "AVATAR")] [ReturnHintsFailure("Cant find UUID in sim")] + [CmdTypeDo()] public object PointAt(string targetUUID) { if (GetClient().Network.CurrentSim.AvatarPositions.ContainsKey(avataruuid) == false) @@ -71,6 +74,7 @@ namespace SecondBotEvents.Commands [ReturnHints("value")] [ReturnHintsFailure("Unknown Key: KeyName")] [ArgHints("Key", "the key we are trying to read from", "Text", "ExampleKey")] + [CmdTypeGet()] public object ReadKeyValue(string Key) { return BasicReply(master.DataStoreService.GetKeyValue(Key)); @@ -82,6 +86,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Value is empty")] [ArgHints("Key", "the key we are trying to set", "Text", "ExampleKey")] [ArgHints("Value", "the value we are tring to put on the key", "Text", "ExampleValue")] + [CmdTypeSet()] public object SetKeyValue(string Key, string Value) { if (SecondbotHelpers.isempty(Key) == false) @@ -100,6 +105,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Key is empty")] [ArgHints("Key", "the key we are trying to clear", "Text", "ExampleKey")] + [CmdTypeSet()] public object ClearKeyValue(string Key) { if (SecondbotHelpers.isempty(Key) == false) @@ -114,6 +120,7 @@ namespace SecondBotEvents.Commands [ReturnHints("ok")] [ReturnHintsFailure("Invaild object UUID")] [ArgHints("target", "a object UUID or the word ground", "Text", "ground")] + [CmdTypeDo()] public object Sit(string target) { if ((target == "ground") || (target == UUID.Zero.ToString())) @@ -131,6 +138,7 @@ namespace SecondBotEvents.Commands [About("Makes the bot stand up if sitting (also resets animations)")] [ReturnHints("ok")] + [CmdTypeDo()] public object Stand() { master.HomeboundService.MarkStandup(); @@ -144,6 +152,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Invaild object UUID")] [ReturnHintsFailure("Unable to see object")] [ArgHints("target", "the object to click on", "UUID")] + [CmdTypeDo()] public object ClickObject(string target) { if (UUID.TryParse(target, out UUID objectuuid) == false) @@ -170,6 +179,7 @@ namespace SecondBotEvents.Commands [About("Makes the bot kill itself you monster")] [ReturnHints("ok")] + [CmdTypeDo()] public object Logoff() { master.BotClient.flagLogoutExpected(); @@ -179,6 +189,7 @@ namespace SecondBotEvents.Commands [About("Gets the last 5 commands issued to the bot")] [ReturnHints("list of commands")] + [CmdTypeGet()] public object GetLastCommands() { List reply = []; @@ -209,6 +220,7 @@ namespace SecondBotEvents.Commands new string[] { "friend", "group", "animation", "teleport", "inventory","command" })] [ArgHints("state", "What state to put the flag into","BOOL")] [ArgHints("sticky", "Should this be repeatable","BOOL")] + [CmdTypeSet()] public object SetPermFlag(string avatar, string flag, string state, string sticky) { ProcessAvatar(avatar); diff --git a/SecondBotEvents/Commands/Services.cs b/SecondBotEvents/Commands/Services.cs index 3786300..131d1e7 100644 --- a/SecondBotEvents/Commands/Services.cs +++ b/SecondBotEvents/Commands/Services.cs @@ -41,6 +41,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to manage selected service")] [ReturnHintsFailure("Service control is not enabled by config")] [ArgHints("servicename","What service to enable","SERVICES","HttpService")] + [CmdTypeDo()] public object EnableAndStartService(string servicename) { if(master.CommandsService.GetAllowServiceCommands() == false) @@ -66,6 +67,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to manage selected service")] [ReturnHintsFailure("Service control is not enabled by config")] [ArgHints("servicename", "What service to stop", "SERVICES", "HttpService")] + [CmdTypeDo()] public object StopService(string servicename) { if (master.CommandsService.GetAllowServiceCommands() == false) @@ -91,6 +93,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Unable to manage selected service")] [ReturnHintsFailure("Service control is not enabled by config")] [ArgHints("servicename", "What service to Restart", "SERVICES", "HttpService")] + [CmdTypeDo()] public object RestartService(string servicename) { if (master.CommandsService.GetAllowServiceCommands() == false) @@ -118,6 +121,7 @@ namespace SecondBotEvents.Commands [ArgHints("servicename", "What service to adjust the config for", "SERVICES", "HttpService")] [ArgHints("configname", "What config value are we updating", "Text", "example")] [ArgHints("configvalue", "What is the new value", "Text", "changedvalue")] + [CmdTypeSet()] public object ChangeConfigValue(string servicename,string configname,string configvalue) { if (master.CommandsService.GetAllowServiceCommands() == false) diff --git a/SecondBotEvents/Commands/StreamAdmin.cs b/SecondBotEvents/Commands/StreamAdmin.cs index 67c80d0..974368e 100644 --- a/SecondBotEvents/Commands/StreamAdmin.cs +++ b/SecondBotEvents/Commands/StreamAdmin.cs @@ -19,6 +19,7 @@ namespace SecondBotEvents.Commands [ReturnHintsFailure("Notecard title is to short")] [ArgHints("endpoint", "The end point","Text","No help given")] [ArgHints("endpointcode", "The end point code", "Text", "No help given")] + [CmdTypeGet()] public object FetchNextNotecard(string endpoint, string endpointcode) { if (SecondbotHelpers.notempty(endpoint) == false) diff --git a/SecondBotEvents/Services/HttpService.cs b/SecondBotEvents/Services/HttpService.cs index 0f4e319..b895803 100644 --- a/SecondBotEvents/Services/HttpService.cs +++ b/SecondBotEvents/Services/HttpService.cs @@ -241,6 +241,42 @@ namespace SecondBotEvents.Services public string classinfo = classinfo; } + [AttributeUsage(AttributeTargets.Method)] + public class CmdType(CommandType setType) : Attribute + { + public CommandType cmdtype = setType; + } + + [AttributeUsage(AttributeTargets.Method)] + public class CmdTypeGet : CmdType + { + public CmdTypeGet() : base(CommandType.Get) + { + } + } + + [AttributeUsage(AttributeTargets.Method)] + public class CmdTypeSet : CmdType + { + public CmdTypeSet() : base(CommandType.Set) + { + } + } + + [AttributeUsage(AttributeTargets.Method)] + public class CmdTypeDo : CmdType + { + public CmdTypeDo() : base(CommandType.Do) + { + } + } + + public enum CommandType + { + Get, + Set, + Do, + } [AttributeUsage(AttributeTargets.Method)] public class About(string about) : Attribute @@ -312,4 +348,5 @@ namespace SecondBotEvents.Services return JsonConvert.SerializeObject(master.CommandsService.RunCommand("HTTP",C)); } } + } diff --git a/SecondBotEvents/WikiService.cs b/SecondBotEvents/WikiService.cs index 93c7147..037f41f 100644 --- a/SecondBotEvents/WikiService.cs +++ b/SecondBotEvents/WikiService.cs @@ -4,6 +4,7 @@ using RestSharp.Extensions; using SecondBotEvents.Services; using System; using System.Collections.Generic; +using System.Data.Common; using System.Linq; using System.Net; using System.Reflection; @@ -66,37 +67,139 @@ namespace SecondBotEvents makefile("index", content, "Index"); } - protected void makecommandlist(Type endpoint, string namespaceworker, string aboutnamespace) + protected string makeCommandList(string namespaceworker, List commands) { - string content = "
<- Back to command sections
" + - "

"+namespaceworker.FirstCharToUpper()+"

"+ aboutnamespace + "

" - +"
"; - content = content + ""; - content = content + ""; - foreach (MethodInfo M in endpoint.GetMethods()) + commands = commands.OrderBy(x => x.Name).ToList(); + string reply = "
"; + foreach (MethodInfo M in commands) { - bool isCallable = false; string about = ""; foreach (CustomAttributeData At in M.CustomAttributes) { if (At.AttributeType.Name == "About") { about = M.GetAttribute().about; - isCallable = true; break; } } - if(isCallable == false) + if(about == "") { - continue; + about = "No description"; + } + if(about.Contains("
") == true) + { + about = about.Split("
")[0]; + } + if (about.Contains("\n") == true) + { + about = about.Split("\n")[0]; } string url = "command" + M.Name.ToLower() + ".html"; - content = content + "
"; - content = content + ""; - content = content + ""; + reply = reply + ""; + reply = reply + "
"; + reply = reply + "" + M.Name+""; + reply = reply + "
"; + reply = reply + "

" + about + "

"; + reply = reply + "
"; makecommandfile(namespaceworker, M, about); } - content = content + "
CommandAbout
" + M.Name + "" + about + "
"; + reply = reply + ""; + return reply; + } + protected void makecommandlist(Type endpoint, string namespaceworker, string aboutnamespace) + { + List getCommands = []; + List setCommands = []; + List doCommands = []; + foreach (MethodInfo M in endpoint.GetMethods()) + { + foreach (CustomAttributeData At in M.CustomAttributes) + { + if (typeof(CmdType).IsAssignableFrom(At.AttributeType)) + { + if (At.AttributeType.Name == "CmdTypeGet") + { + getCommands.Add(M); + } + else if (At.AttributeType.Name == "CmdTypeSet") + { + setCommands.Add(M); + } + else if (At.AttributeType.Name == "CmdTypeDo") + { + doCommands.Add(M); + } + break; + } + } + } + string content = ""; + if (((getCommands.Count > 0) || (setCommands.Count > 0)) && (doCommands.Count == 0)) + { + // get set only (no do commands) + content = "
<- Back to command sections
" + + "

" + namespaceworker.FirstCharToUpper() + "

" + aboutnamespace + "

" + + "
" + + "
" + + "" + + "" + + ""; + + content = content + "" + + "" + + "
Get (" + getCommands.Count.ToString() + ") / Set (" + setCommands.Count.ToString() + ")
" + makeCommandList(namespaceworker, getCommands) + "" + makeCommandList(namespaceworker, setCommands) + "
"; + } + else if (((getCommands.Count == 0) && (setCommands.Count == 0)) && (doCommands.Count > 0)) + { + // Do only (no get/set commands) + content = "
<- Back to command sections
" + + "

" + namespaceworker.FirstCharToUpper() + "

" + aboutnamespace + "

" + + "
" + + "
" + + "" + + "" + + ""; + + content = content + "" + + "" + + "
Do (" + doCommands.Count.ToString() + ")
" + makeCommandList(namespaceworker, doCommands) + "
"; + } + else if ((getCommands.Count > 4) && (setCommands.Count > 4)) + { + // mix of both + content = "
<- Back to command sections
" + + "

" + namespaceworker.FirstCharToUpper() + "

" + aboutnamespace + "

" + + "
" + + "
" + + "" + + "" + + "" + + "" + + ""; + + content = content + "" + + "" + + "" + + "" + + "
Get (" + getCommands.Count.ToString() + ")Set (" + setCommands.Count.ToString() + ")Do (" + doCommands.Count.ToString() + ")
" + makeCommandList(namespaceworker, getCommands) + "" + makeCommandList(namespaceworker, setCommands) + "" + makeCommandList(namespaceworker, doCommands) + "
"; + } + else + { + // mix of both + content = "
<- Back to command sections
" + + "

" + namespaceworker.FirstCharToUpper() + "

" + aboutnamespace + "

" + + "
" + + "
" + + "" + + "" + + "" + + ""; + + content = content + "" + + "" + + "" + + "
Get (" + getCommands.Count.ToString() + ") / Set (" + setCommands.Count.ToString() + ")Do (" + doCommands.Count.ToString() + ")
" + makeCommandList(namespaceworker, getCommands) + "" + makeCommandList(namespaceworker, setCommands) + "" + makeCommandList(namespaceworker, doCommands) + "
"; + } makefile(namespaceworker, content, "Command list for "+ namespaceworker.FirstCharToUpper()); }