BastliBridge

A bot framework bridgin multiple IM protocols, and mail
git clone git://xatko.vsos.ethz.ch/BastliBridge.git
Log | Files | Refs | Submodules

commit 4b1f8271e03cf647b82d99431bbde08eb0632c14
parent 066ad8201fe75dcf54567ae5682e75061645998b
Author: Dominik Schmidt <das1993@hotmail.com>
Date:   Thu, 14 Sep 2017 21:19:24 +0200

Connect the telegram-watcher to the eventloop only when we're connected to IRC

Otherwise, messages might get lost.

Diffstat:
src/telegram.d | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/telegram.d b/src/telegram.d @@ -429,6 +429,8 @@ struct Bot{ ircClient.nickName="bastli"; ircClient.onConnect~=((){ info("Connected to IRC on ",ircClient.serverAddress); + ev_io_start(eventloop, &w_tele.io); + telegram.triggerUpdates(); foreach(k;lut.ircChannels){ ircClient.join(k); } @@ -625,9 +627,7 @@ struct Bot{ void start(){ info("Starting the event-listeners"); - telegram.triggerUpdates(); ev_io_start(eventloop, &w_irc.io); - ev_io_start(eventloop, &w_tele.io); ev_io_start(eventloop, &w_stdin.io); }