diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index 1866fb6be..b071fc301 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -56,13 +56,14 @@ class Network(callbacks.Plugin): @internationalizeDocstring def connect(self, irc, msg, args, opts, network, server, password): - """[--ssl] [] [] + """[--nossl] [] [] Connects to another network (which will be represented by the name provided in ) at . If port is not provided, it - defaults to 6667, the default port for IRC. If password is - provided, it will be sent to the server in a PASS command. If --ssl is - provided, an SSL connection will be attempted. + defaults to 6697, the default port for IRC with SSL. If password is + provided, it will be sent to the server in a PASS command. If --nossl is + provided, an SSL connection will not be attempted, and the port will + default to 6667. """ if '.' in network: irc.error("Network names cannot have a '.' in them. " @@ -75,14 +76,16 @@ class Network(callbacks.Plugin): # quite sure what to do about it. except callbacks.Error: pass - ssl = False + ssl = True for (opt, arg) in opts: - if opt == 'ssl': - ssl = True + if opt == 'nossl': + ssl = False if server: if ':' in server: (server, port) = server.split(':') port = int(port) + elif ssl: + port = 6697 else: port = 6667 serverPort = (server, port) diff --git a/scripts/supybot-wizard b/scripts/supybot-wizard index 7db6996ff..511363be3 100644 --- a/scripts/supybot-wizard +++ b/scripts/supybot-wizard @@ -389,15 +389,15 @@ def main(): output("""Found %s (%s).""" % (serverString, ip)) - if advanced: - # conf.supybot.networks..ssl - output("""Some servers allow you to use a secure connection via SSL. - This requires having pyOpenSSL installed.""") - if yn('Do you want to use an SSL connection?', default=False): - network.ssl.setValue(True) + # conf.supybot.networks..ssl + output("""Most networks allow you to use a secure connection via SSL. + If you are not sure whether this network supports SSL or not, check + its website.""") + if yn('Do you want to use an SSL connection?', default=True): + network.ssl.setValue(True) output("""IRC servers almost always accept connections on port - 6667 (or 6697 when using SSL). They can, however, accept connections + 6697 (or 6667 when not using SSL). They can, however, accept connections anywhere their admins feel like they want to accept connections from.""") if yn('Does this server require connection on a non-standard port?', default=False): diff --git a/src/conf.py b/src/conf.py index e6ad01cea..95d91980a 100644 --- a/src/conf.py +++ b/src/conf.py @@ -306,7 +306,7 @@ class ValidSaslMechanism(registry.OnlySomeStrings): class SpaceSeparatedListOfSaslMechanisms(registry.SpaceSeparatedListOf): Value = ValidSaslMechanism -def registerNetwork(name, password='', ssl=False, sasl_username='', +def registerNetwork(name, password='', ssl=True, sasl_username='', sasl_password=''): network = registerGroup(supybot.networks, name) registerGlobalValue(network, 'password', registry.String(password,