hirc

[archived] IRC client
git clone https://hhvn.uk/hirc
git clone git://hhvn.uk/hirc
Log | Files | Refs

rpl-conf-gen.awk (427B)


      1 #!/bin/awk -f
      2 # Parses RFC1459 for config[]
      3 # This file is placed in the public domain.
      4 
      5 $1 ~ /^[0-9][0-9][0-9]$/ && ($2 ~ /RPL_/ || $2 ~ /ERR_/) {
      6 	rpl = tolower($2);
      7 	sub(/_/, ".", rpl);
      8 	printf("\t{\"format.%s\", 1, Val_string,\n", rpl);
      9 	printf("\t\t.str = \"${2-}\",\n");
     10 	printf("\t\t.strhandle = config_redraws,\n");
     11 	printf("\t\t.description = {\n");
     12 	printf("\t\t\"Format of %s (%03d) numeric\", NULL}},\n", $2, $1)
     13 }