Truncate item names to what the server actually sees

This is far from optimal, but the server was already doing it silently,
and the new server now rejects it.

Also make magic.conf use an item name, since previously it
was (correctly) rejecting the item name as nonexistent
and was using an ID instead.