]>
jfr.im git - irc/quakenet/snircd.git/blob - tools/convert_slines.sh
3 # $Id: asuka-sethost.patch,v 1.29 2005/02/24 01:06:52 froo Exp $
5 # aid in converting S: and F:lines from old lain configs
6 # to the new "super S:line" format of asuka.
9 # 2003-01-05 froo@quakenet.org Created.
13 USAGE
="Usage: $PROG </path/to/ircd.cfg>"
22 if [ ! -f $CONFIG ]; then
23 echo "Can't open \"$CONFIG\", bailing out."
28 for LINE
in `grep -E "^F:" $CONFIG`
30 IDENT
=`echo $LINE | cut -f2 -d:`
31 REALHOST
=`echo $LINE | cut -f3 -d:`
32 SPOOFHOST
=`echo $LINE | cut -f4 -d:`
34 IDENT
=`echo $IDENT | sed -e 's,^~,\*,'`
36 echo "S:$SPOOFHOST::$REALHOST:$IDENT"
39 for LINE
in `grep -E "^S:" $CONFIG`
41 SPOOFHOST
=`echo $LINE | cut -f2 -d:`
42 PASSWD
=`echo $LINE | cut -f3 -d:`
44 IDENT
=`echo $IDENT | sed -e 's,^~,\*,'`
46 echo "S:$SPOOFHOST:$PASSWD::"