Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Audio alerts (beep)
- Custom commands: `/highlight`, `/unhighlight`, `/highlightuser`

- **url_logger.lua** (218 lines):
- **url_logger.lua** (217 lines):
- URL detection and logging from chat messages
- Timestamp and channel information storage
- Search and filtering capabilities
- Configurable buffer size (default 500 URLs)
- Custom commands: `/urls [count|clear|search]`, `/urlconfig`

#### Added - Comprehensive Documentation
- **scripts/README.md** (600+ lines):
- **scripts/README.md** (740+ lines):
- Complete scripting system overview
- Getting started tutorial
- Full IRC API reference for all 50+ functions
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Built with Rust for memory safety, performance, and cross-platform reliability.
- 🎨 **Script Management**: Load, unload, enable, disable, reload scripts
- 📊 **State Queries**: Access server, channel, and user information
- 💬 **UI Integration**: Print messages, display notifications, update status
- 🔍 **Complete Documentation**: 600+ line guide with API reference and tutorials
- 🔍 **Complete Documentation**: 740+ line guide with API reference and tutorials
- ✅ **Production Ready**: 11 comprehensive tests, all passing

## 🏗️ Current Development Status
Expand Down Expand Up @@ -212,7 +212,7 @@ Built with Rust for memory safety, performance, and cross-platform reliability.
- highlight.lua - Keyword highlighting with notifications
- url_logger.lua - URL logging with search and filtering
- ✅ **Script Management**: Load, unload, enable, disable, reload operations
- ✅ **Comprehensive Documentation**: 600+ line [scripts/README.md](scripts/README.md) with complete API reference
- ✅ **Comprehensive Documentation**: 740+ line [scripts/README.md](scripts/README.md) with complete API reference
- ✅ **Production Quality**: 11 tests passing, zero errors, all functionality verified

#### Pending Phase 4 Components
Expand Down
8 changes: 6 additions & 2 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,11 @@ function irc.on_message(event)
end
end

irc.print("Auto-responder loaded with " .. #responses .. " triggers")
local trigger_count = 0
for _ in pairs(responses) do
trigger_count = trigger_count + 1
end
irc.print("Auto-responder loaded with " .. trigger_count .. " triggers")
```

### Example: Channel Logger
Expand Down Expand Up @@ -448,7 +452,7 @@ function irc.on_message(event)
local message = event.params[#event.params]

-- Match URLs (basic pattern)
for url in message:gmatch("https?://[%w-_%.%?%.:/%+=&]+") then
for url in message:gmatch("https?://[%w-_%.%?:/%+=&%%#~]+") then
-- This would require http client API
-- irc.http_get(url, function(response)
-- local title = response:match("<title>(.-)</title>")
Expand Down
7 changes: 3 additions & 4 deletions scripts/url_logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local CONFIG = {
local url_log = {}

-- URL pattern (basic HTTP/HTTPS detection)
local URL_PATTERN = "https?://[%w-_%.%?%.:/%+=&%%#~]+"
local URL_PATTERN = "https?://[%w-_%.%?:/%+=&%%#~]+"

---Helper function to add URL to log
---@param url string The URL to log
Expand Down Expand Up @@ -100,9 +100,8 @@ function irc.on_message(event)
-- Skip excluded channels
if is_excluded(channel) then return end

-- Extract nickname from message prefix if available
local nick = "unknown"
-- In a real implementation, we'd parse this from the IRC message prefix
local nick = "unknown" -- TODO: Extract from IRC message prefix if available
-- Nickname extraction not currently implemented

-- Find all URLs in message
for url in message:gmatch(URL_PATTERN) do
Expand Down