Code Monkey home page Code Monkey logo

secondbot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

secondbot's Issues

Add support for json encoded commands

Currently the formatting for sending a command to the bot is "weird"

IM|||avatar~#~message

Spec:
Command [[ ||| ]  [Arg 1 [ ~#~Arg 2]]]

the bot should accept a json encoded message with the following specs

  • Command Only
{
  "cmd": "GoHome"
}
  • Command + Args array
{
  "cmd": "IM",
  "args": [
    "avatar",
    "message"
  ]
}
  • Command + Args array + Signing [Used by scripts]
{
  "cmd": "IM",
  "args": [
    "avatar",
    "message"
  ],
  "signing": "sha1Bit"
}
  • Command + Args array + reply target
{
  "cmd": "IM",
  "args": [
    "avatar",
    "message"
  ],
  "reply": "channel number, avatar, HTTP URL"
}
  • Command + Args array + reply target + Signing [Used by scripts]
{
  "cmd": "IM",
  "args": [
    "avatar",
    "message"
  ],
  "reply": "channel number, avatar, HTTP URL",
  "signing": "sha1Bit"
}

http_enable=true crash bot

Describe the bug
Bot shuts down with error message when Http_Enable is set to true:
System.UnauthorizedAccessException: Access to the path '/scoped_tokens.json' is denied.

To Reproduce

  1. running BetterSecondbot-linux-666510b.zip on linux
  2. See error

Expected behavior
no crash with Http_Enable set to true

Hardware (please complete the following information):

  • OS: linux
  • Version [666510b
  • Running in docker: No

Opt out command signing

Currently all commands from scripts must have a vaild command signing hash

this feature will add a new config value

security_master_owner_optout :  false

when true commands from scripts are allowed to drop the command signing requirement and it will be treated
as if the command was a IM directly from the master.

notes:
if you res unknown scripts with this set to true the scripts could issue commands to the bot so this is a small security risk
and should not be enabled for bots that have funds enabled.

Feature request: Controlling a bot with IMs

Is your feature request related to a problem? Please describe.
I would like to be able to control a bot with chat commands from the "bot master" account.

Describe the solution you'd like
I would like to send the bot the same commands that are used from the Web UI, but in an IM.
These commands would only be executed if they come from one of the accounts that are set as bot master in the configuration.
For example, "sit " to sit on the object with that uuid, or "Say hello world"

Verbose logging options for Docker

Is your feature request related to a problem? Please describe.
A local logfile for the Docker instance to be used for Troubleshooting

Describe the solution you'd like
We run into issues sometimes where it's unclear if we are doing something wrong or if something is wrong with the bot, it would be nice to have a local logfile where the bot could spit errors, exceptionss, status updates that aren't even posted into the interface chat. Things like "Creating channel for because they sent me an IM" "Opening IM from : "

Describe alternatives you've considered
Logging levels would also be nice just for the interface channel however it would be less spammy if it was a logfile instead

Extend and correct command SetPermFlag also add a new event

SetPermFlag wiki entry is very wrong and missing positive outcomes for return types

SetPermFlag does not have support for an inventory event so the bot will reject it if not from the master or itself.

  • Example call
SetPermFlag|||UUIDHERE~#~inventory~#~true~#~false

at the same time I am going to add a new command

SetInventoryUpdate|||type~#~target [http, channel, avatar]

this will add a event when new inventory is found that matches the type

that outputs a json as follows

{
"inventoryUUID": "X",
"inventoryName": "X",
"inventoryCreator": "X"
}

sent to the given target

ClearInventoryUpdate|||type

can be used to clear the event

Group notice attachment support

Is your feature request related to a problem? Please describe.
The current group notice command does not support adding an attachment to the notice

Describe the solution you'd like
add an optional arg to the command where you can pass an inventory UUID to send with the group notice

Describe alternatives you've considered
1: Use a object to force send it
(Slow, requires uuid of group members no command to get uuids of group members right now)

Discord setup event not fireing

Describe the bug
when connecting a new bot the discord events to create the channels do not fire and the bot hard exits.

Version:
windows build: Last updated: 30/03/2021

Notes:
this is because of a permissions error, as the bot was unable to create channels / category's
we should have it check if it has admin permissions and if not shutdown with a warning.

help with setup for docker

hello i am trying to run Secondbot in docker on debian 12.
i did:
~$ docker run madpeter/secondbot
[13:46] Status - Hardware config
[13:46] Warn - Using: using default folder
[13:46] Log - Basic Wiki [Creating]
[13:46] Log - [WIKI] Starting area JSON
[13:46] Log - [WIKI] Done with area
[13:46] Log - [WIKI] Starting area HTTP endpoint
[13:46] Log - [WIKI] Done with area
[13:46] Log - Basic Wiki [Ready]
[13:46] Warn - Json config does not Exist creating it for you
[13:46] Status - - Exiting in 5 secs -

are there any help files how to setup the bot in docker?

Better relay - reenable support for single shot env values

the current way each entry is split up per key value

but we could reenable the single shot version ie

encode-as-json::true,source-type::discord,source-filter::serverid@channelid,target-type::http,target-config::http://url.com/endpoint

also we could shorten the keys

encode-as-json:: =  eJson::
source-type:: = sType::
source-filter:: = sFilter::
target-type:: = tType::
target-config::  = tConfig::

so the value would look like

eJson::true,sType::discord,sFilter::serverid@channelid,tType::http,tConfig::http://url.com/endpoint

make sure to update https://github.com/Madpeterz/SecondBot/wiki/BetterRelay-system after

Estate Ban Add/Remove

Add abilitry to add/remove from estate list.

Give different reply back for Added and already on.

SetParcelSale Command - Allow L$0 Direct Sales

Is your feature request related to a problem? Please describe.
I am attempting to use the bot to automatically clear and resell parcels in my estate when a tenant goes overdue. This process involves using estate manager permissions to reclaim the parcel which sets the parcel owner to the region owner. I then transfer the parcel to be owned by my group before listing it for sale. To do this within SL's permission system requires the bot to sell the parcel to itself (land goes from being owned by the region owner to being owned by the bot) and then deed the parcel to the group. At this point the bot may tweak parcel settings as necessary before finally listing the parcel for sale.

The problem lies within the parcel transfer steps. Currently I get an error {"reply": "Invaild amount","status": false} when trying to sell the parcel from the region owner directly to the bot with a L$0 price. This is a departure from SL viewer behavior which allows L$0 direct sales, but disallows L$0 sales to "anyone".

Describe the solution you'd like
The command parcel/SetParcelSale should allow a L$0 price when a parcel is set for sale directly to another avatar (i.e. the "avatar" argument for the command is not "none").

Describe alternatives you've considered
The only other option I've considered is to set the price of a parcel sale to L$1 when transferring directly. This is not ideal as it requires continuously ensuring that the bot account has a wallet balance to use for these transactions either by paying L$ to the bot manually or by using LSL's debit permissions to automate the transfer.

Expand on event support

Currently there is no support to get the X, Y, Z values for the bots location
we would also want to add a value type check called near

for example

event_4_where_1=[X] {NEAR} 120
event_4_where_2=[Y] {NEAR} 55
event_4_where_3=[Z] {NEAR} 2010

near would support the target value +- 5
close would support the target value +- 2

Adjust at home system to use preferred regions

currently if the bot gets to a region that is marked as home it will give up

we should be able to add a score before the region
ie

1=secondbot/234/234/324,2=Store/4243/24234/24234,3=place/2324/2323/232

so if the bot finds itself at [2] "store" region it will check if [1] "secondbot" region is online and try to teleport to it
always moving to the lowest number

Pause Bot in between Events

When using events on a bot, can we add a pause timer (time adjustable) so that the Bot has time to complete rezzing itself and its clothing, before starting an event or continuing to a step within the event?

Second life response going to a "SecondLife channel in Discord

Describe the bug
When the user is not online, the SL message is going to a SecondLife Channel (IM box) in Discord.

To Reproduce
Steps to reproduce the behavior:

  1. Send a message to someone not online
  2. see the response and its location

Expected behavior
The response is sent to the appropriate channel i.e. if I send madpeter a message and he is not online, it goes to the discord channel (IM box) create title Madpeter

Screenshots
You already saw it happen live...

Hardware (please complete the following information):
Discord and Docker

Additional context
N/A

Alt regions for avoiding restarts

Right now if the bot avoids a restart by going to a 2nd sim it never returns

Suggestion is to add a new value for the @home system

AvoidRestartRegions

that contains alt sims to teleport to, and then after 10 mins attempt going back to the home regions

Group get group members uuid

Is your feature request related to a problem? Please describe.
there is currently no way to get a list of group members uuid's from the bot

Describe the solution you'd like
A new command to get group members as a csv

Feature request: RLV support

Is your feature request related to a problem? Please describe.
I would like to have better control over a bot from within SL.

Describe the solution you'd like
If the bot software had support for RLV I could just slap a collar on a bot and use that to control the bot.

Additional context
RLV support could be adapted from Radegast which has RLV and is also written in c#...

HowTo Configure

Maybe i've missed something but unfortunately i don't get any hint how to configure SecondBot or how to configure docker to get it working properly. There's also no documentation for any of the commands i've found.

Is it possible to get a link to a documentation or a guide how to get second bot up and running?

Give Folder Inventory error

Describe the bug
When sending the command with the correct UUID for give folder the command responds with a incorrect uuid.

To Reproduce
Steps to reproduce the behavior:
Send the command with a correct uuid
parseCmd("SendFolder",["5fce3da5-6acd-42ef-a39a-5b4b30c1fbe8+",(string)llDetectedKey(0)],"0");

Expected behavior
It is so post to give you the folder with everything in it.

Screenshots
https://i.imgur.com/ckwnV1x.png

Bot Relogs ever 15-45 min

Describe the bug
The bot is using HTTPS and for some reason the bot will reboot and after coming back online it will not respond to commands reliably and has to be reset to work again.

To Reproduce
Steps to reproduce the behavior:
Have bot connected to StreamAdmin7 and it will have the issue also.

Expected behavior
Should just stay on and not reboot

Screenshots
Just logs...
[08:12] THEbot_01 is offline.
[08:12] THEbot_01 is online.
[08:27] THEbot_01 is offline.
[08:27] THEbot_01 is online.
[09:11] THEbot_01 is offline.
[09:12] THEbot_01 is online.
[09:56] THEbot_01 is offline.
[09:56] THEbot_01 is online.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.