#HELP# /invite [] - invite someone logged in current channel # # This will use write(1) to invite a user # CMD_invite() { if [ -z "$JOINPID" ]; then echo "Join a channel first" return fi if [ -z "$1" ]; then echo "invite who ?" return fi who="$1" if [ -n "$2" ]; then msg=$@ else msg="$LOGNAME invites you to join $JOINNAME" fi echo $msg | write $who }