aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-07-30 23:25:59 +0000
committerterminaldweller <devi@terminaldweller.com>2024-07-30 23:25:59 +0000
commit81469bbb1745a835676c3664e75a4a951223da9d (patch)
tree70a53b118c406d5958a8fb8c72e391fb6439f729 /README.md
parentwe can now add new commands from lua plugins (diff)
downloadmilla-81469bbb1745a835676c3664e75a4a951223da9d.tar.gz
milla-81469bbb1745a835676c3664e75a4a951223da9d.zip
* fixed a crash when unloading a lua script
* added event types, foreground and background color for watchlists * added a url_encode function to lua to encode urls. Underneath, it just calls the standard library function from golang * updated the README * the urban plugin now can take in the number of entries to return * reverted a bug where setting the http proxy for the lua http module was not working * fixed the url for the ip script so it is actually working. the current provider does not support ipv6 though
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index 467a5b7..58713b1 100644
--- a/README.md
+++ b/README.md
@@ -272,6 +272,9 @@ Watchlists allow you to specify a list of channels to watch. The watched values
watchList = ["#securityfeeds"]
watchFiles = ["/watchfiles/voidbox.list"]
alertChannel = "#milla_alerts"
+eventTypes = ["PRIVMSG"]
+fgColor = 0
+bgColor = 28
```
### Example Config File
@@ -706,6 +709,10 @@ milla.query_db(query)
milla.register_cmd(script_path, cmd_name, function_name)
```
+```lua
+milla.url_encode(str)
+```
+
Using `register_cmd` we can register a command that will be available to run like the built-in and customs commands.<br/>
Here's an example of how to use it:<br/>
@@ -725,7 +732,7 @@ local http = require("http")
-- should only return one string value
function milla_get_ip(arg)
local ip = arg
- local response, err = http.request("GET", "http://ip-api.com/json?" .. ip)
+ local response, err = http.request("GET", "http://ip-api.com/json/" .. ip)
if err ~= nil then print(err) end
local json_response, err = json.decode(response.body)
@@ -746,7 +753,7 @@ milla.register_cmd("/plugins/ip.lua", "ip", "milla_get_ip")
This will allow us to do:<br/>
```
-/terra: /ip 1.1.1.1
+terra: /ip 1.1.1.1
```
The example rss plugin, accepts a yaml file as input, reeds the provided rss feeds once, extracts the title, author name and link to the resource, sends the feed over to the `#rssfeed` irc channel and exits.<br/>