view bin/show @ 4058:d6a049bf90e4

<mrhmouse> echo "(function(){var e,l,o,t;t=process.argv[2],(null!=t?t.length:void 0)||(console.log(\'Usage: ello <name>\'),process.exit()),o=/(.*)(e)$/i,e=/(.*)([bcdfghjklmnpqrstvwxz])([o0].*)/i,l=/[bcdfghjklmnpqrstvwxz]/i,console.log(e.test(t)?t.replace(e,function(e,l,o,t){return l+o+\'ell\'+t}):o.test(t)?t.replace(o,function(e,l){return l+\'ello\'}):l.test(t)?t+\'ello\':\'Hello, \'+t+\'!\')}).call(this);" >> bin/ello
author HackBot
date Fri, 22 Nov 2013 15:58:10 +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