Skip to content

Commit 995ed91

Browse files
Copilotdoublegate
andcommitted
Address PR review comments: remove placeholders, update prototype dependencies
Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com>
1 parent 45785eb commit 995ed91

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

prototypes/network-tokio/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
tokio = { version = "1.41", features = ["full"] }
7+
tokio = { version = "1.48", features = ["full"] }
88
tokio-rustls = "0.26"
99
rustls = "0.23"
1010
rustls-pemfile = "2.2"

prototypes/scripting-lua/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
mlua = { version = "0.10", features = ["lua54", "vendored", "async", "send"] }
8-
tokio = { version = "1.41", features = ["full"] }
7+
mlua = { version = "0.11", features = ["lua54", "vendored", "async", "send"] }
8+
tokio = { version = "1.48", features = ["full"] }
99
anyhow = "1.0"
1010
tracing = "0.1"
1111
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }

scripts/README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,22 +434,31 @@ end
434434
irc.print("Channel logger active (/viewlog [lines])")
435435
```
436436

437-
### Example: URL Title Fetcher
437+
### Example: URL Title Fetcher (Future Feature Concept)
438438

439439
```lua
440-
-- Note: Network access would require future API expansion
441-
-- This shows the concept
442440
--[[
443-
url_titles.lua
441+
IMPORTANT: This is a CONCEPTUAL EXAMPLE demonstrating a planned future feature.
442+
The HTTP client API (irc.http_get) does not currently exist in the scripting engine.
443+
This code is provided to illustrate potential future capabilities and API design,
444+
not as working functionality. DO NOT attempt to use this code as-is.
445+
446+
url_titles.lua (CONCEPT ONLY - NOT IMPLEMENTED)
444447
Fetches and displays titles for URLs posted in chat
445448
449+
Future feature requirements:
450+
- HTTP client API integration (irc.http_get or similar)
451+
- Async HTTP request handling
452+
- HTML parsing capabilities
453+
- Rate limiting to prevent abuse
454+
446455
function irc.on_message(event)
447456
if event.type == "message" then
448457
local message = event.params[#event.params]
449458
450459
-- Match URLs (basic pattern)
451460
for url in message:gmatch("https?://[%w-_%.%?%.:/%+=&]+") then
452-
-- This would require http client API
461+
-- FUTURE API: This would require http client API implementation
453462
-- irc.http_get(url, function(response)
454463
-- local title = response:match("<title>(.-)</title>")
455464
-- if title then

scripts/url_logger.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ function irc.on_message(event)
101101
if is_excluded(channel) then return end
102102

103103
-- Extract nickname from message prefix if available
104-
local nick = "unknown"
105-
-- In a real implementation, we'd parse this from the IRC message prefix
104+
-- Note: In the actual IRC integration, the nickname would be parsed from
105+
-- the message prefix. For this example script, we use a placeholder.
106+
local nick = event.prefix and event.prefix:match("^([^!]+)") or "unknown"
106107

107108
-- Find all URLs in message
108109
for url in message:gmatch(URL_PATTERN) do

0 commit comments

Comments
 (0)