Permalink
Browse files

Return more user-friendly message with incorrect vhost4/6 setting in …

…config. Closes #316

* Return more user-friendly message when vhost4/6 (or the deprecated my-ip/hostname) are incorrectly set in config.
* Update language files (where possible) with error translations (TODO - finnish and danish)
  • Loading branch information...
1 parent 571975b commit 5e35eb63c090fb685dbc027b431e958f838f264d @Cizzle Cizzle committed with vanosg Jan 26, 2017
@@ -205,8 +205,8 @@ Telnet botten og skriv 'NEW' som dit nick.\n
0x647,Modek� er p�
0x648,Serverk� er p�
0x649,Hj�lpek� er p�
-# 0x64a - unused
-# 0x64b - unused
+0x64a,Vhost set in config can not be used to connect to this address
+0x64b,Vhost set in config is not available on this machine
0x64c,Behandler kanal
0x64d,Kanal
0x64e,�nsker kanal
@@ -205,8 +205,8 @@ Telnet to the bot and enter 'NEW' as your nickname.
0x647,Mode queue is at
0x648,Server queue is at
0x649,Help queue is at
-# 0x64a - unused
-# 0x64b - unused
+0x64a,Vhost set in config can not be used to connect to this address
+0x64b,Vhost set in config is not available on this machine
0x64c,Processing channel
0x64d,Channel
0x64e,Desiring channel
@@ -205,8 +205,8 @@ Telnettaa botille ja sy
0x647,Moodi queue on nyt
0x648,Serveri queue on nyt
0x649,Auto queue on nyt
-# 0x64a - ei k�yt�ss�
-# 0x64b - ei k�yt�ss�
+0x64a,Vhost set in config can not be used to connect to this address
+0x64b,Vhost set in config is not available on this machine
0x64c,Tapahtuma kanava
0x64d,Kanava
0x64e,Halutaan kanava
@@ -206,8 +206,8 @@ Faites un Telnet sur le bot et entrez 'NEW' comme surnom.
0x647,La file d'attente des modes est �
0x648,La file d'attente des serveurs est �
0x649,La file d'attente d'aide est �
-# 0x64a - unused
-# 0x64b - unused
+0x64a,Le vhost qu'est configuré dans le fichier de configuration n'est pas capable de connecter à l'addresse du serveur
+0x64b,Le vhost qu'est configuré dans le fichier de configuration n'est pas disponsible en cette machine
0x64c,Traitement du canal
0x64d,Canal
0x64e,Je d�sire le canal
@@ -212,8 +212,8 @@ Baue eine Telnetverbindung zu dem Bot auf und gib 'NEW' als Deinen Nickname ein.
0x647,Mode-Queue ist bei
0x648,Server-Queue ist bei
0x649,Hilfe-Queue ist bei
-# 0x64a - unused
-# 0x64b - unused
+0x64a,Der Vhost, der in der Konfig eingestellt ist, kann nicht benutzt werden um zu dieser IP-Adresse zu verbinden
+0x64b,Der Vhost, der in der Konfig eingestellt ist, ist auf diesem Computer nicht verfügbar
0x64c,Bearbeite Channel
0x64d,Channel
#need context
View
@@ -197,8 +197,8 @@
#define IRC_MODEQUEUE get_language(0x647)
#define IRC_SERVERQUEUE get_language(0x648)
#define IRC_HELPQUEUE get_language(0x649)
-/* was: IRC_BOTNOTONIRC 0x64a */
-/* was: IRC_NOTACTIVECHAN 0x64b */
+#define IRC_VHOSTWRONGNET get_language(0x64a)
+#define IRC_VHOSTBADADDR get_language(0x64b)
#define IRC_PROCESSINGCHAN get_language(0x64c)
#define IRC_CHANNEL get_language(0x64d)
#define IRC_DESIRINGCHAN get_language(0x64e)
@@ -1290,8 +1290,16 @@ static void server_resolve_success(int servidx)
setsnport(dcc[servidx].sockname, dcc[servidx].port);
serv = open_telnet_raw(dcc[servidx].sock, &dcc[servidx].sockname);
if (serv < 0) {
+ char *errstr = NULL;
+ if (errno == EINVAL) {
+ errstr = IRC_VHOSTWRONGNET;
+ } else if (errno == EADDRNOTAVAIL) {
+ errstr = IRC_VHOSTBADADDR;
+ } else {
+ errstr = strerror(errno);
+ }
putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
- strerror(errno));
+ errstr);
check_tcl_event("fail-server");
lostdcc(servidx);
return;

0 comments on commit 5e35eb6

Please sign in to comment.