Added all of the existing code
This commit is contained in:
60
scripts/demo_user_modes.sh
Executable file
60
scripts/demo_user_modes.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
# God Mode and Stealth Mode User Mode Demo
|
||||
# This script demonstrates the new user mode implementation
|
||||
|
||||
echo "=== God Mode and Stealth Mode User Mode Demo ==="
|
||||
echo ""
|
||||
echo "God Mode and Stealth Mode are now implemented as proper IRC user modes:"
|
||||
echo ""
|
||||
|
||||
echo "🔱 GOD MODE (+G):"
|
||||
echo " /mode mynick +G # Enable God Mode - Ultimate channel override powers"
|
||||
echo " /mode mynick -G # Disable God Mode"
|
||||
echo ""
|
||||
echo " Capabilities:"
|
||||
echo " • Join banned/invite-only/password/full channels"
|
||||
echo " • Cannot be kicked by anyone"
|
||||
echo " • Override all channel restrictions"
|
||||
echo ""
|
||||
|
||||
echo "👻 STEALTH MODE (+S):"
|
||||
echo " /mode mynick +S # Enable Stealth Mode - Invisible to regular users"
|
||||
echo " /mode mynick -S # Disable Stealth Mode"
|
||||
echo ""
|
||||
echo " Effects:"
|
||||
echo " • Hidden from /who and /names for regular users"
|
||||
echo " • Still visible to other operators"
|
||||
echo " • Invisible channel presence"
|
||||
echo ""
|
||||
|
||||
echo "⚡ COMBINED USAGE:"
|
||||
echo " /mode mynick +GS # Enable both modes simultaneously"
|
||||
echo " /mode mynick -GS # Disable both modes"
|
||||
echo ""
|
||||
|
||||
echo "📋 REQUIREMENTS:"
|
||||
echo " • Must be an IRC operator (/oper)"
|
||||
echo " • Operator class must have 'god_mode' and/or 'stealth_mode' permissions"
|
||||
echo " • Can only set modes on yourself"
|
||||
echo ""
|
||||
|
||||
echo "🛡️ PERMISSIONS:"
|
||||
echo " Add to your operator class in configs/opers.conf:"
|
||||
echo ' "permissions": ["*", "god_mode", "stealth_mode"]'
|
||||
echo ""
|
||||
|
||||
echo "🔍 CHECKING CURRENT MODES:"
|
||||
echo " /mode mynick # Show your current user modes"
|
||||
echo ""
|
||||
|
||||
echo "Example operator class with both permissions:"
|
||||
echo '{'
|
||||
echo ' "name": "admin",'
|
||||
echo ' "rank": 4,'
|
||||
echo ' "permissions": ["*", "god_mode", "stealth_mode"]'
|
||||
echo '}'
|
||||
echo ""
|
||||
|
||||
echo "This follows proper IRC conventions - user modes instead of custom commands!"
|
||||
echo "Use /mode +G and /mode +S just like any other IRC user mode."
|
||||
59
scripts/test_irc_connection.sh
Executable file
59
scripts/test_irc_connection.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Simple IRC client test to debug connection issues
|
||||
# This script connects to the IRC server and sends basic registration commands
|
||||
|
||||
echo "=== TechIRCd Connection Test ==="
|
||||
echo "Testing IRC registration sequence..."
|
||||
echo ""
|
||||
|
||||
# Create a temporary file for the test
|
||||
TEST_FILE="/tmp/irc_test.txt"
|
||||
|
||||
# Connect and send basic registration commands
|
||||
{
|
||||
echo "NICK testuser"
|
||||
echo "USER testuser 0 * :Test User"
|
||||
sleep 2
|
||||
echo "QUIT :Test complete"
|
||||
} | nc -q 3 127.0.0.1 6667 | tee "$TEST_FILE"
|
||||
|
||||
echo ""
|
||||
echo "=== Raw IRC Server Response ==="
|
||||
cat "$TEST_FILE"
|
||||
echo ""
|
||||
|
||||
echo "=== Analysis ==="
|
||||
if grep -q "001" "$TEST_FILE"; then
|
||||
echo "✅ RPL_WELCOME (001) found - Server sent welcome message"
|
||||
else
|
||||
echo "❌ RPL_WELCOME (001) NOT found - Registration may have failed"
|
||||
fi
|
||||
|
||||
if grep -q "002" "$TEST_FILE"; then
|
||||
echo "✅ RPL_YOURHOST (002) found"
|
||||
else
|
||||
echo "❌ RPL_YOURHOST (002) NOT found"
|
||||
fi
|
||||
|
||||
if grep -q "003" "$TEST_FILE"; then
|
||||
echo "✅ RPL_CREATED (003) found"
|
||||
else
|
||||
echo "❌ RPL_CREATED (003) NOT found"
|
||||
fi
|
||||
|
||||
if grep -q "004" "$TEST_FILE"; then
|
||||
echo "✅ RPL_MYINFO (004) found"
|
||||
else
|
||||
echo "❌ RPL_MYINFO (004) NOT found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "If the pyechat client connects but shows nothing, it might be:"
|
||||
echo "1. Not sending NICK/USER commands automatically"
|
||||
echo "2. Expecting different IRC numeric responses"
|
||||
echo "3. Not parsing the IRC protocol properly"
|
||||
echo "4. Waiting for specific server capabilities"
|
||||
|
||||
# Cleanup
|
||||
rm -f "$TEST_FILE"
|
||||
Reference in New Issue
Block a user