Fix error in /amsg and /ame if applies to all active connections.

Steps to reproduce:
1. Make sure there are some other inactive (not connected) connections besides the selected one.
2. Activate "/amsg and /me applies to all active connections" in Preferences->Advanced->Command Scope
3. Enter /amsg sample text or /ame sample text

The selected channel will be spammed by lots of messages, one for each channel in each inactive connection.