postdata local post nr extra post POST_ ENGINE nr post nr die SERVICE

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
postdata() {
local post nr extra f
post=POST_$ENGINE
nr=${!post//[^ ]}
[[ 6 = ${#nr} ]] || die "\"${SERVICE}\" is not supported by ${FUNCNAME}()."
extra=${!post%% *}
[[ '%' = $extra ]] || echo -n "$extra&"
e() {
post="$1"
shift
while [[ -n $1 ]]; do
f=${post%% *}
[[ '%' != $f ]] && echo -n "$f=${!1}" && [[ $# -gt 1 ]] && echo -n "&"
shift
post=${post#$f }
done
}
e "${!post#$extra }" NICK DESCRIPTION LANGUAGE EXPIRATION CVT_TABS INPUT
}