summaryrefslogtreecommitdiff
path: root/dircpsa.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-11-17 21:48:49 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-11-17 21:48:49 +0800
commit61ebb77a2919911d01ded1885db5473f59d45e7f (patch)
tree857f110460b2e151eabd9a312ee84183b4c0890a /dircpsa.c
parent7f6145fe91d5b4ccdd2036d739a2bf456b789ede (diff)
Return 0 if session terminatedHEADmaster
Diffstat (limited to 'dircpsa.c')
-rw-r--r--dircpsa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dircpsa.c b/dircpsa.c
index 9fbe6cb..05bf018 100644
--- a/dircpsa.c
+++ b/dircpsa.c
@@ -68,8 +68,13 @@ int main (int argc, char *argv[])
}
if (irc_run(session)) {
- printf("Could not connect or I/O error: %s\n", irc_strerror(irc_errno(session)));
- return 1;
+ int errno = irc_errno(session);
+ if (errno == LIBIRC_ERR_TERMINATED)
+ return 0;
+ else {
+ printf("Could not connect or I/O error: %s\n", irc_strerror(errno));
+ return 1;
+ }
}
return 0;