Map the DICT commands to slang functions.
provide the feature "dict-backend":
provide("dict-backend");
This way a user (or a frontend) can select a backend with:
require("dict-backend", "dict-<flavour>.sl");
All arguments are strings
word: search term, can be also a string of more than one word
database: comma separated list of databases
use dict_show("db", host) to get a list of valid database names
host: URL of the host, may contain the port appended after colon e.g. "localhost", "dict.org", "dict.example.org:3343"
strategy: use dict_show("strat", host) to get valid values
what: one of "db", "strat", "server", "info:<db>"
The slang functions should insert the result of the command into the current buffer.
This is the easiest way for the command line interface, otherwise I would need to insert the command, read it to a string and pass upwards (only to be eventually re-inserted by the calling fun))
An alternative is: return response as string
Preferabely format the response similar to the dict command line program.
CLIENT text STATUS HELP % is this needed? Possibly use dict_show("help") QUIT OPTION AUTH username authentication-string SASLAUTH