diff --git a/modules/generic-command-processor/data.json b/modules/generic-command-processor/data.json new file mode 100644 index 0000000..ab44c23 --- /dev/null +++ b/modules/generic-command-processor/data.json @@ -0,0 +1,3 @@ +{ + "s": "Головна сторінка сервера: http://10.1.1.1:12010/" +} diff --git a/modules/generic-command-processor/index.py b/modules/generic-command-processor/index.py new file mode 100644 index 0000000..6a0d4cf --- /dev/null +++ b/modules/generic-command-processor/index.py @@ -0,0 +1,6 @@ +command_storage = json.loads(open(self.path + "data.json").read()) + +received_command = self.MESSAGE.text[1:] + +if received_command in command_storage: + self.RESPONSE = command_storage[received_command] diff --git a/modules/generic-command-processor/meta.json b/modules/generic-command-processor/meta.json new file mode 100644 index 0000000..5daefdd --- /dev/null +++ b/modules/generic-command-processor/meta.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "index_file": "index.py", + "start_on_boot": true, + "alias": "generic-command-processor" +}