#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/mail-dataswamp lh=127.0.0.1 swamp-port-rewire () { local beg=$1 local end=$2 local srv=dataswamp.org local slp=120 ssh -L $lh:$beg:$lh:$end -N -o ServerAliveInterval=$slp $srv & } smtp-to-swamp () { swamp-port-rewire 2525 25 } beg_irc=6668 irc-to-swamp () { swamp-port-rewire $beg_irc 2778 } restart () { smtp-to-swamp irc-to-swamp } swirc-to-swamp () { local name=$(whoami) swirc \ -c $lh:$beg_irc \ -p \ -j \#dataswamp \ -n $name \ -u $name \ -r real-deal-${name}field } alias winx=swirc-to-swamp