NyxStudios/TShock — pull request #802 by atom0s (2014-05-26 23:53:58+00:00)
Title: Prevent collection modification.

When a command handler is called, if that callback attempts to register a new command it will cause the collection to be modified since it is not a copied list.

For example with my Addons plugin, when you use:
/addon load test

This will invoke the plugins handler for the addon command. If an addon that is loaded during this time tries to register its own command the collection will be modified and error. Adding .ToList() to the Where clause will prevent this as a copy of the collection is created instead of iterating the existing collection during runtime.