changeset 12101:2b3cc639ed6d draft

<fizzie> ` rm /hackenv/bin/show /hackenv/lib/dcc # this one just won\'t work
author HackEso <hackeso@esolangs.org>
date Sat, 16 Nov 2019 22:29:40 +0000
parents a0dcc6e74ca1
children 4c3037681978
files bin/show lib/dcc
diffstat 2 files changed, 0 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/bin/show	Sat Nov 16 22:27:24 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#!/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
--- a/lib/dcc	Sat Nov 16 22:27:24 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-# Configuration:
-
-# IP of the host, must be in the stupid long integer form
-DCC_IP="1077849409"
-
-# Port range
-DCC_PORT_MIN="10000"
-DCC_PORT_RANGE="100"
-
-# Library:
-
-# Get a DCC port
-dcc_port() {
-    echo $(( DCC_PORT_MIN + (RANDOM % DCC_PORT_RANGE) ))
-}
-
-# Start a DCC chat to $1
-dcc_chat() {
-    DCC_PORT=`dcc_port`
-    (
-        sleep 1
-        echo -e 'PRIVMSG '$1' :\x01DCC CHAT chat '$DCC_IP' '$DCC_PORT'\x01' |
-            socat STDIN UNIX-SENDTO:$IRC_SOCK
-    ) &
-    socat -T30 - TCP4-LISTEN:$DCC_PORT,crnl
-}
-
-# Start a DCC SEND of $2 to $1
-dcc_send() {
-    DCC_PORT=`dcc_port`
-    (
-        sleep 1
-        echo -e 'PRIVMSG '$1' :\x01DCC SEND '$2' '$DCC_IP' '$DCC_PORT'\x01' |
-            socat STDIN UNIX-SENDTO:$IRC_SOCK
-    ) &
-    socat -T30 - TCP4-LISTEN:$DCC_PORT
-}