Make chain length configurable.

The default is still 3. Chain length is only used when learning. When
replying chain length is a product of the data retrieved from the
database. A flush is suggested though.
Depend on client.msg extracting the nickname