diff options
-rw-r--r-- | examples/jarvis.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index 6df70fa..7d27901 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -84,7 +84,7 @@ var notifsrc = '\ \n\ For a node.js YWOT api: \n\ & http://github.com/feynmansfedora/ywot-clean \n\ -& Try `jarvis` today. Uptime: UPTIME. Called: JARVISx\n\ +& Try `jarvis` today. Uptime: UPTIME. Called: JARVISx \n\ ' var minsUp = 0; var callct = 0; @@ -99,14 +99,14 @@ function notifRefresh(){ let diff = newnotif.copy(); if (typeof notif !== 'undefined') diff.comb(notif, comb.sub); notif = newnotif; - writes.enqueue(...diff.towrite()); ctrl = ms(notif); + return (diff.towrite()); } function timect(){ - notifRefresh(); - setTimeout(timect, 60*1000); minsUp++; + writes.enqueue(...notifRefresh()); + setTimeout(timect, 60*1000); } function protectArea(send, tiles, locs){ @@ -155,8 +155,7 @@ response.adhoc('yes, my liege'); function respond(coord){ console.log('called at', coord); callct += 1; - notifRefresh(); response.loc = coord; - writes.enqueue(...response.towrite()); + writes.enqueue(...response.towrite().concat(notifRefresh())); read.update(response); } |