# # Converts wc3 Banlist from version before 3.x (txt Format) # to the new 3.0 XML Format # written 11/2007 by Stefan Hummert (Donneker) # # this script is to use with awk / gawk # usage: awk -f convert_wc3_banlist.awk yourbanlist.txt >newFilename.xml # # BEGIN { print "" print "" } { nick=$1 time=$7 date=$11 comment=substr($0,length(nick)+2) if ( index(date,"-") > 4 ) { date2=substr(date,2,7) "-01" } else { date2="2004-01-01" } if ( index(time,":") < 1 ) { time="00:01:01"; } if ( comment == "" ) comment="-"; print " " print " " comment "" print " " print " " date2 "" print " " print " " print "" } END { print "" }