view bin/show @ 5970:462ea3a590f1

<b_jonas> ` -e bin/en2sv || >bin/en2sv \'use Encode; binmode *$_,"encoding(utf8)" for STDIN,STDOUT; local$/; for (split//,<STDIN>) { rand(5)<3 and y/EOeo/\\xc4\\xc5\\xe4\\xe5/; print }\'; chmod a+x bin/en2sv
author HackBot
date Thu, 10 Sep 2015 11:26:11 +0000
parents 859f9b4339e6
children
line wrap: on
line source

#!/bin/sh
. lib/dcc

# Sanitize
INTERP=`echo "$2" | sed 's/[^A-Za-z0-9]/_/g'`

if [ ! -e subinterps/"$INTERP".cmd ]
then
    echo 'That is not a user interpreter!'
    exit 1
fi

if [ "`wc -l subinterps/$INTERP.arg | sed 's/ .*//'`" -gt 1 ]
then
    echo "`cat subinterps/$INTERP.cmd`" '(sending via DCC)'
    dcc_chat $IRC_NICK < subinterps/$INTERP.arg
else
    echo "`cat subinterps/$INTERP.cmd`" "`cat subinterps/$INTERP.arg`"
fi