Added an automatic mode toggle.

This small change allows ops (and other modes such as halfop, admin/protected or whatever other mode, provided the bot can change it) to join the game and be automatically deopped, then re-opped on game end. The setting can be a string (default: empty string), a list, tuple or set. If a string, it should contain all the characters for the modes. Another iterable should contain one-character items of the modes. Any invalid mode character fed in is ignored. The prefix (such as @ for +o) is a valid value.

Thanks to bcode for feedback on how to properly handle the modes.