[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/irc irc.c,1.15,1.16
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/irc irc.c,1.15,1.16 |
Date: |
Mon, 24 Mar 2003 18:46:41 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/irc
In directory subversions:/tmp/cvs-serv10103/modules/irc
Modified Files:
irc.c
Log Message:
show errors to users, not stderr
Index: irc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/irc/irc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- irc.c 24 Mar 2003 23:13:17 -0000 1.15
+++ irc.c 24 Mar 2003 23:46:39 -0000 1.16
@@ -43,6 +43,8 @@
#include <errno.h>
#include <fcntl.h>
+#include "dialog.h"
+
#include "gtk_globals.h"
#include "service.h"
#include "util.h"
@@ -985,7 +987,10 @@
if( status == -1 || (status == 0 && firstread == 1))
{
/* Connection closed by other side - log off */
- fprintf(stderr, "IRC: Connection closed by
%s\n", ila->server);
+ char buff[1024];
+ snprintf(buff, sizeof(buff), _("Connection
closed by %s."), ila->server);
+ do_error_dialog(buff, "IRC Error");
+ fprintf(stderr, buff);
ela->connected = 0;
if (ila->fd_tag)
eb_input_remove(ila->fd_tag);
@@ -1114,7 +1119,14 @@
/* Setup and connect */
host = gethostbyname(ila->server);
- if (!host) { fprintf(stderr, "IRC: gethostbyname() failed for %s\n",
ila->server); return; }
+ if (!host) {
+ char buff[1024];
+ snprintf(buff, sizeof(buff), _("%s: Unknown host."),
ila->server);
+ do_error_dialog(buff, "IRC Error");
+ fprintf(stderr, buff);
+
+ return;
+ }
site.sin_family = AF_INET;
site.sin_addr.s_addr = *(long *)(host->h_addr);
@@ -1127,7 +1139,11 @@
if (connect(i, (struct sockaddr *)&site, sizeof(site)) < 0)
{
- fprintf(stderr, "IRC: connect() failed for %s\n", ila->server);
+ char buff[1024];
+ snprintf(buff, sizeof(buff), _("Cannot connect to %s."),
ila->server);
+ do_error_dialog(buff, "IRC Error");
+ fprintf(stderr, buff);
+
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/irc irc.c,1.15,1.16,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.409,1.410 configure.in,1.404,1.405
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/yahoo2/libyahoo2 libyahoo2.c,1.19,1.20 yahoo_httplib.c,1.6,1.7
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.409,1.410 configure.in,1.404,1.405
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/yahoo2/libyahoo2 libyahoo2.c,1.19,1.20 yahoo_httplib.c,1.6,1.7
- Index(es):