I'm making a simple irc bot with netcat. The first part is:
#! /bin/bash
# nc -c ./connect.sh irc.rizon.net 6667
tee /dev/stderr | {
sleep 5
echo "USER testbot * * :test"
echo "NICK testbot"
read line ; echo $line | sed -e "s/^PING/PONG/"
sleep 3
echo "JOIN #channel"
} | tee /dev/stderr
Running this on a nc instance connecting to my own nc server works exactly as expected, however connecting to irc.rizon.net gives:
~/programs/testbot# nc -c ./connect.sh irc.rizon.net 6667
:irc.mufff.in NOTICE * :*** Looking up your hostname...
:irc.mufff.in NOTICE * :*** Checking Ident
:irc.mufff.in NOTICE * :*** Couldn't look up your hostname
:irc.mufff.in NOTICE * :*** No Ident response
USER testbot * * :test
NICK testbot
:irc.mufff.in NOTICE connect.sh file1.txt file2.png file3.py :*** Looking up your hostname...
PING :29785872
:irc.mufff.in 451 testbot :You have not registered
JOIN #channel
:irc.mufff.in 451 testbot :You have not registered
...where connect.sh file1.txt file2.png file3.py
is the list of files in the directory I ran the commmand in.