內容簡介
JTZL's Chat for WebIRC 外掛提供了一個輕量級的 IRC 客戶端,使用原生 JavaScript 實現,支援直接的 WebSocket 連接到 IRC 伺服器,並具備可選的 WebIRC 閘道功能,適合需要即時通訊的網站。
【主要功能】
• 輕量級的 TypeScript/JavaScript 實現
• 支援多種 IRC 指令,超過 30 種命令
• 可編輯的使用者名稱,實時驗證
• 自動保存已登入使用者的暱稱
• 現代響應式設計,適合各種螢幕尺寸
• 可配置的伺服器允許清單,強化安全性
外掛標籤
開發者團隊
原文外掛簡介
This plugin provides a shortcode that renders a lightweight IRC client written in vanilla JavaScript. It supports direct WebSocket connections to IRC servers (IRCv3-friendly) and includes an optional WebIRC gateway.
Security-conscious defaults:
Server allow-list (host:port format), WSS (WebSockets over SSL/TLS) only
Optional WebSocket subprotocols (e.g., text.ircv3.net)
Optional WS path (e.g., /webirc)
Optional CSP connect-src helper (off by default)
Input sanitization and validation
Proper escaping of output
Features:
Modern Responsive Design: Mobile-first approach with adaptive layouts for all screen sizes
Enhanced Mobile Experience: Touch-optimized interface with proper virtual keyboard support
Smart Responsive Behavior: Overlay sidebar on mobile, collapsible on tablet, side-by-side on desktop
Editable Username: Click-to-edit nickname with real-time validation and user persistence
User Persistence: Automatic nickname saving for logged-in WordPress users
Lightweight vanilla TypeScript/JavaScript implementation (no frameworks)
Fully responsive design with semantic HTML
Internationalization ready (i18n strings)
Configurable server allow-list with strict validation
WebSocket subprotocol support (IRCv3)
Optional WebIRC gateway fallback
Comprehensive IRC slash commands: 30+ commands including /join, /part, /nick, /msg, /whois, /topic, /away, /help, and more
Automatic nickname generation and collision handling
Debug logging and connection status indicators
Optional Content Security Policy (CSP) header generation
WordPress hooks and filters for extensibility
Follows WordPress Coding Standards
Usage
Basic Usage:
Simply add the shortcode [chat_webirc] to any page or post where you want the IRC chat to appear. The plugin will use secure default settings to connect to a test IRC server.
Shortcode Examples:
* Basic: [chat_webirc] – Uses default server and channel
* Custom channel: [chat_webirc channel="#mychannel"]
* Custom server: [chat_webirc server="irc.example.com:7443" channel="#general"]
Available IRC Commands:
Once the chat is loaded, users can use these commands:
Basic Commands:
* /join #channel – Join a channel
* /part [#channel] – Leave current or specified channel
* /nick newname – Change nickname
* /quit [message] – Disconnect
* /help – Show all available commands
Communication:
* /msg
* /notice
* /me
* /query
User & Channel Info:
* /whois
* /who [channel] – List users in channel
* /list [pattern] – List available channels
* /names [channel] – List nicknames in channel
* /topic [text] – View/set channel topic
Status & Utility:
* /away [message] – Set away status
* /back – Remove away status
* /ping
* /version [nick] – Get version info
Advanced Commands:
* /ctcp
* /motd [server] – View message of the day
* /stats
* /raw
Type /help in the chat for the complete command reference.
Configuration:
Go to Settings → Chat for WebIRC in your WordPress admin to customize servers, channels, and security options.
Notes
Some public IRC networks may restrict WebSocket connections to certain origins. The included test server permits connections for testing purposes.
Do not send sensitive information. This client is intentionally minimal and does not yet support SASL authentication.
