Explorar o código

* Add 'servers6-ssl'

Bryan Drewery %!s(int64=15) %!d(string=hai) anos
pai
achega
727dbcb0ed
Modificáronse 3 ficheiros con 16 adicións e 2 borrados
  1. 2 0
      doc/help.txt
  2. 9 1
      doc/settings.txt
  3. 5 1
      src/set.c

+ 2 - 0
doc/help.txt

@@ -1652,7 +1652,9 @@ See also: reload, backup
 [D]  $bhijack$b          How to handle when a commonly used hijack method attempt is detected. 
  
 [L]  $bservers$b         Comma-separated list of servers the bot will use.
+[L]  $bservers-ssl$b     Comma-separated list of SSL servers to use if server-use-ssl is true.
 [L]  $bservers6$b        Comma-separated list of servers the bot will use (FOR IPv6).
+[L]  $bservers6-ssl$b    Comma-separated list of IPv6 SSL servers to use if server-use-ssl is true.
  
 [N]  $bmsgburst$b        How many messages to burst at once to server. (Too high will excess flood)
 [N]  $bmsgrate$b         How often (msecs) to dequeue msgs to the server. Only used on

+ 9 - 1
doc/settings.txt

@@ -54,7 +54,7 @@ irc.efnet.nl
 irc.inet.tele.dk
 irc.ipv6.he.net
 irc.ipv6.homelien.no
-irc.paraphysics.net
+irc.ipv6.paraphysics.net
 irc.underworld.no
 
 :servers_ssl
@@ -69,6 +69,14 @@ irc.shoutcast.com:8000
 irc.umich.edu:9999
 irc.underworld.no
 
+:servers6_ssl
+efnet.ipv6.xs4all.nl
+irc.choopa.ca:9999
+irc.choopa.net:9999
+irc.ipv6.he.net
+irc.ipv6.paraphysics.net
+irc.underworld.no
+
 :rbl
 dnsbl.ahbl.org
 dnsbl.proxybl.org

+ 5 - 1
src/set.c

@@ -127,6 +127,7 @@ static variable_t vars[] = {
  VAR("servers",		&serverlist,		VAR_SERVERS|VAR_LIST|VAR_SHUFFLE|VAR_NOLHUB|VAR_NOLDEF,	0, 0, DEFAULT_SERVERS),
  VAR("servers-ssl",	&serverlist,		VAR_SERVERS|VAR_LIST|VAR_SHUFFLE|VAR_NOLHUB|VAR_NOLDEF,	0, 0, DEFAULT_SERVERS_SSL),
  VAR("servers6",	&serverlist,		VAR_SERVERS|VAR_LIST|VAR_SHUFFLE|VAR_NOLHUB|VAR_NOLDEF,	0, 0, DEFAULT_SERVERS6),
+ VAR("servers6-ssl",	&serverlist,		VAR_SERVERS|VAR_LIST|VAR_SHUFFLE|VAR_NOLHUB|VAR_NOLDEF,	0, 0, DEFAULT_SERVERS6_SSL),
  VAR("trace",		&trace,			VAR_INT|VAR_DETECTED,				0, 4, "die"),
  VAR("usermode",	&usermode,		VAR_WORD|VAR_NOLHUB,				0, 0, "+iws"),
  VAR(NULL,		NULL,			0,						0, 0, NULL)
@@ -143,7 +144,10 @@ static bool use_server_type(const char *name)
       if (ssl_use || (!conf.bot->net.host6 && !conf.bot->net.ip6)) /* we probably want to use the normal server list.. */
         return 0;
     } else if (!strcmp(name, "servers-ssl")) {
-      if (!ssl_use)
+      if (!ssl_use || conf.bot->net.host6 || conf.bot->net.ip6) /* we want to use the servers6-ssl entry. */
+        return 0;
+    } else if (!strcmp(name, "servers6-ssl")) {
+      if (!ssl_use || (!conf.bot->net.host6 && !conf.bot->net.ip6)) /* we probably want to use the normal servers-ssl list.. */
         return 0;
     }
   }