summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/blabouncer.c b/blabouncer.c
index b6dc015..851df7a 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -895,8 +895,11 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli
// Finally do a replay for all clients and tell them we're reconnected
for (int i = 0; i < MAXCLIENTS; i++) {
if (clients[i].fd) {
- doreplay(clients[i].fd, settings->replayseconds, clients, settings, ircdstrings, channels);
char alertmsg[MAXDATASIZE];
+ if (!doreplay(clients[i].fd, settings->replayseconds, clients, settings, ircdstrings, channels)) {
+ snprintf(alertmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstrings->ircnick);
+ sendtoclient(sourcefd, alertmsg, clients, settings, 0);
+ }
snprintf(alertmsg, MAXDATASIZE, "NOTICE %s :Reconnection complete.", ircdstrings->ircnick);
sendtoclient(clients[i].fd, alertmsg, clients, settings, 0);
}
@@ -1687,7 +1690,10 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli
clients[arrindex(clients, sourcefd)].registered = 1;
// Catch the client up with the default number of seconds of replay
- doreplay(sourcefd, settings->replayseconds, clients, settings, ircdstrings, channels);
+ if (!doreplay(sourcefd, settings->replayseconds, clients, settings, ircdstrings, channels)) {
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstrings->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
+ }
free(strcopyPtr);
return 1;
@@ -1964,7 +1970,10 @@ int processircmessage(SSL *server_ssl, char *str, int source, struct client *cli
debugprint("Replaying '%s' which is '%d' seconds.\n", tokens[2], replayseconds);
- doreplay(sourcefd, replayseconds, clients, settings, ircdstrings, channels);
+ if (!doreplay(sourcefd, replayseconds, clients, settings, ircdstrings, channels)) {
+ snprintf(outgoingmsg, MAXDATASIZE, "NOTICE %s :Unable to read replay log file!", ircdstrings->ircnick);
+ sendtoclient(sourcefd, outgoingmsg, clients, settings, 0);
+ }
free(timestrcopyPtr);
free(strcopyPtr);
return 1;