lc (486 bytes)
1 #!/bin/sh 2 3 # Script to connect to existing IRC channels using lchat-connect 4 # Usage: lc <channel-name> 5 6 [ $# -eq 1 ] || { echo "Usage: $0 <channel-name>"; exit 1; } 7 8 irc_dir="$HOME/scr/irc" 9 [ -d "$irc_dir" ] || { echo "Error: IRC directory $irc_dir not found"; exit 1; } 10 11 # Find server containing the channel 12 for server_dir in "$irc_dir"/irc.*; do 13 [ -d "$server_dir/#$1" ] && exec lchat-connect "$irc_dir" "${server_dir##*/}" "#$1" 14 done 15 16 echo "Error: Channel #$1 not found"; exit 1