Remove scope page

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-12 22:01:29 +02:00
parent 329216c082
commit 7879720d07
15 changed files with 30 additions and 489 deletions
+1 -21
View File
@@ -2,7 +2,6 @@ package plugins
import (
"log"
"net/url"
"strings"
"time"
@@ -65,26 +64,7 @@ func registerUtilities(L *lua.LState, mgr *Manager, p *Plugin) {
return 0
}))
L.SetGlobal("is_in_scope", L.NewFunction(func(L *lua.LState) int {
raw := L.CheckString(1)
if mgr.broker == nil {
L.Push(lua.LTrue)
return 1
}
u, err := url.Parse(raw)
if err != nil {
L.Push(lua.LFalse)
return 1
}
path := u.Path
if path == "" {
path = "/"
}
L.Push(lua.LBool(mgr.broker.IsInScope(u.Host + path)))
return 1
}))
L.SetGlobal("quit", L.NewFunction(func(L *lua.LState) int {
L.SetGlobal("quit", L.NewFunction(func(L *lua.LState) int {
reason := L.OptString(1, "plugin requested quit")
select {
case mgr.Quit <- reason: