diff options
author | Peter Palfrader <peter@palfrader.org> | 2007-11-24 11:47:29 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2007-11-24 11:47:29 +0000 |
commit | 1aad40847c44a6f7c123a345d41cd3f7387bf981 (patch) | |
tree | 6f63925d1e9720c47e826cad2d7d4d49dc54a867 /zshrc | |
parent | b446b9e463d98e3468f4c13c67eb10a07077b3f0 (diff) |
OFTC irssi aliases
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@307 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-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 |