Merge pull request #919 from GLolol/network/no-dots-in-netname

Network: don't allow '.' in network names (Closes #874)
This commit is contained in:
Valentin Lorentz 2014-11-27 09:57:52 +01:00
commit 099fe17079

View File

@ -62,6 +62,10 @@ class Network(callbacks.Plugin):
provided, it will be sent to the server in a PASS command. If --ssl is provided, it will be sent to the server in a PASS command. If --ssl is
provided, an SSL connection will be attempted. provided, an SSL connection will be attempted.
""" """
if '.' in network:
irc.error("Network names cannot have a '.' in them. "
"Remember, this is the network name, not the actual "
"server you plan to connect to.", Raise=True)
try: try:
otherIrc = self._getIrc(network) otherIrc = self._getIrc(network)
irc.error(_('I\'m already connected to %s.') % network) irc.error(_('I\'m already connected to %s.') % network)