zigdon / xkcd-Bucket

Bucket is the channel bot for #xkcd
http://wiki.xkcd.com/irc/Bucket
121 stars 31 forks source link

Insufficient alias flattening while teaching #131

Open dgw opened 4 years ago

dgw commented 4 years ago

Only one level of aliases is removed when learning. Teaching to a chain of aliases can end up adding the new factoid to an alias still.

For example, say the database contains these aliases: 'foo' \ 'bar' 'bar' \ 'baz'

Teaching "Bucket, foo is spam eggs": 'bar' is 'spam eggs' added to database.

This doesn't seem right. Aliases shouldn't have other factoids. It can lead to e.g. #45.