diff options
-rw-r--r-- | zshrc | 60 |
1 files changed, 42 insertions, 18 deletions
@@ -211,31 +211,55 @@ fi if [ "$HOSTNAME" = 'andromeda' ] ; then alias ldapvi-nonanoymous='ldapvi -h localhost -D uid=weasel,ou=users,ou=accounts,dc=oftc,dc=net -b dc=oftc,dc=net' fi -if [ "$HOSTNAME" = 'asteria' ] && [ -r "$HOME/hostsoftc" ] ; then - if [ -e "$HOME/.oftc-port" ]; then - oftcircport="--port=`cat $HOME/.oftc-port`" - else - oftcircport="" - fi - cat "$HOME/hostsoftc" | while read name ip; do +if [ "$HOSTNAME" = 'asteria' ] && [ -r "$HOME/.oftc-hosts" ] ; then + cat "$HOME/.oftc-hosts" | while read name ip; do alias -g $name-ip="$ip" - alias irssi-$name="irssi --home=$HOME/.irssi-$name --connect=$ip --nick=weasel-$name $oftcircport" - done + alias irssi-$name="irssi --home=$HOME/.irssi-MASTER --connect=OFTC-$name" - if [ -e "$HOME/.oftc-testnet-port" ]; then - oftcircport="--port=`cat $HOME/.oftc-testnet-port`" - else - oftcircport="--port=16667" - fi - cat "$HOME/hostsoftc" | while read name ip; do alias -g $name-testnet-ip="$ip" - alias irssi-testnet-$name="irssi --home=$HOME/.irssi-$name --connect=$ip --nick=weasel-$name $oftcircport" + alias irssi-testnet-$name="irssi --home=$HOME/.irssi-MASTER --connect=TESTNET-$name" + +# irssi-$name () { +# local ip name oftcircport +# name=`echo "$0" | sed -e 's/irssi-//'` +# ip=`awk '$1=="'"$name"'" {print $2}' $HOME/.oftc-hosts` +# if ! [ -d "$HOME/.irssi-$name" ] && [ -e "$HOME/.irssi-MASTER" ]; then +# mkdir "$HOME/.irssi-$name" +# ln -s ../.irssi-MASTER/config $HOME/.irssi-$name/config +# fi +# if ! [ -e "$HOME/.irssi-$name/scripts" ] && [ -e "$HOME/.irssi-MASTER/scripts" ]; then +# ln -s ../.irssi-MASTER/scripts $HOME/.irssi-$name/scripts +# fi +# if [ -e "$HOME/.oftc-port" ]; then +# oftcircport="--port=`cat $HOME/.oftc-port`" +# else +# oftcircport="" +# fi +# irssi --home=$HOME/.irssi-$name --connect=$ip --nick=weasel-$name $oftcircport +# } + +# irssi-testnet-$name () { +# local ip name oftcircport +# name=`echo "$0" | sed -e 's/irssi-testnet-//'` +# ip=`awk '$1=="'"$name"'" {print $2}' $HOME/.oftc-hosts` +# if ! [ -d "$HOME/.irssi-testnet-$name" ] && [ -e "$HOME/.irssi-MASTER" ]; then +# mkdir "$HOME/.irssi-testnet-$name" +# ln -s ../.irssi-MASTER/config $HOME/.irssi-testnet-$name/config +# fi +# if ! [ -e "$HOME/.irssi-testnet-$name/scripts" ] && [ -e "$HOME/.irssi-MASTER/scripts" ]; then +# ln -s ../.irssi-MASTER/scripts $HOME/.irssi-testnet-$name/scripts +# fi +# if [ -e "$HOME/.oftc-testnet-port" ]; then +# oftcircport="--port=`cat $HOME/.oftc-port`" +# else +# oftcircport="" +# fi +# irssi --home=$HOME/.irssi-testnet-$name --connect=$ip --nick=weasel-$name $oftcircport +# } done fi - - if [ -e /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi |