commit a5d02a601487b19a7041db41ef85af918761d017
parent a1b8fa50cc632d02a635f98c8374c5103dfc4639
Author: Marcel Radzio <marcel@radzio-sh.de>
Date: Sat, 12 Dec 2015 23:15:23 +0100
Update README and add Documentation
Diffstat:
4 files changed, 37 insertions(+), 23 deletions(-)
diff --git a/INSTALL.md b/INSTALL.md
@@ -1,19 +0,0 @@
-Main
-====
-!!!IMPORTANT!!! RUN HANDLER INSTALL BEFORE SCRIPT START!!!
-
-1. npm install request
-2. node main.js
-
-Pushbullet Handler
-==================
-1. npm install curlrequest
-2. Add ``var pushbullet = require('./handlers/pushbullet.js');`` to main.js at the Load section in the Top
-3. Add ``pushbullet.pushbulletSend(door_status);`` to main.js at the Runtime section in the middle
-4. add your own pushbullet API key in "handler/pushbullet.js"
-
-IRC Handler
-===========
-1. npm install irc
-2. Add ``var irc = require('./handlers/irc.js');`` to main.js at the Load section in the Top
-3. Add ``irc.ircSend(door_status);`` to main.js at the Runtime section in the middle
diff --git a/README.md b/README.md
@@ -1,2 +1,27 @@
-# nordlab-hackerspace-door
-Modular parser for the hackerspace door status with handlers for multiple services
+Nordlab Bot
+===========
+Modular parser for the hackerspace door status with handlers for multiple services and IRC Bot for the Nordlab e.V.
+
+How to install
+==============
+1. npm install
+2. npm start
+
+Commandline options
+===================
+When using commandline arguments use ```node main.js``` to start.<br>
+```--noupdate``` - stops bot from getting updates <br>
+
+Commands
+========
+```!help | !hilfe``` - Lists all commands in a PM<br>
+```!doorstatus``` - Send an PM with the actual Door Status<br>
+```!doorstatus [arg]``` - If the arg is "this" it sends in the actual channel the Door Status or is there an existing channel as argument it sends to the channel which is the argument<br>
+```!where``` - Send an PM with the address of the Hackerspace<br>
+```!who``` - Send an PM with information about who can go to the Hackerspace<br>
+```!when``` - Send an PM with information about when the Hackerspace usually is open<br>
+```!source``` - Send an PM with the Link of this Repo<br>
+```!license``` - Send an PM with the link of the Bot license<br>
+```!afk``` - Send in the actual channel that you are A(way) F(rom) K(eyboard)<br>
+```!alone``` - Send in the actual channel that you are Alone in the channel<br>
+```!freifunk``` - Send in the actual channel a link with an Meme about Freifunk<br>
diff --git a/commands.json b/commands.json
@@ -2,13 +2,13 @@
"commands": [
{
"keyword": "help",
- "message": "Here is your Help!\nCommand List:\n- !help - Shows this page.\n- !DoorStatus - Shows the actual Door Status in an PM\n- !DoorStatus channel - Shows the actual Door Status in the channel drom where it was run\n- !where - Shows the address of the Nordlab e.V.\n- !who - Shows who is allowed to come to the Nordlab e.V.\n- !when - Shows who the Nordlab e.V. Hackerspace usually is open",
+ "message": "Here is your Help!\nCommand List:\n- !help - Shows this page.\n- !DoorStatus - Shows the actual Door Status in an PM\n- !DoorStatus channel - Shows the actual Door Status in the channel drom where it was run\n- !where - Shows the address of the Nordlab e.V.\n- !who - Shows who is allowed to come to the Nordlab e.V.\n- !when - Shows who the Nordlab e.V. Hackerspace usually is open\n- !source - Shows where the source of this bot is.\n- !license - What is the license of the bot?????????",
"argument": "1",
"target": "from"
},
{
"keyword": "hilfe",
- "message": "Hier ist die Hilfe!\nBefehl-liste:\n- !hilfe - Zeigt diese Seite.\n- !DoorStatus - Sendet eine PM mit dem aktuellen Status\n- !DoorStatus channel - Sendet in den Channel wo der Befehl ausgeführt wurde den aktuellen Status\n- !where - Zeigt die Addresse vom Nordlab e.V.\n- !who - Zeigt wer alles kommen darf Nordlab e.V.\n- !when - Zeigt wann der Nordlab e.V. Hackerspace geöffnet hat",
+ "message": "Hier ist die Hilfe!\nBefehl-liste:\n- !hilfe - Zeigt diese Seite.\n- !DoorStatus - Sendet eine PM mit dem aktuellen Status\n- !DoorStatus channel - Sendet in den Channel wo der Befehl ausgeführt wurde den aktuellen Status\n- !where - Zeigt die Addresse vom Nordlab e.V.\n- !who - Zeigt wer alles kommen darf Nordlab e.V.\n- !when - Zeigt wann der Nordlab e.V. Hackerspace geöffnet hat\n- !source - Zeigt wo die Source des Bot's sind.\n- !license - HILFE! Welche Lizenz hat der Bot?????????",
"argument": "1",
"target": "from"
},
diff --git a/main.js b/main.js
@@ -15,6 +15,7 @@ function sleep(milliseconds) {
}
}
}
+console.log("Starting up...");
var door_status2 = "1";
irc.ircPreload();
function MakePush(){
@@ -75,4 +76,11 @@ if (!argv.noupdate) {
});
});
}
+if (argv.noupdate) {
+ var j = schedule.scheduleJob('* 2 * * *', function(){
+ console.log('Daily Restart!');
+ bot.ircEndCustom('Daily Restart! Coming back in a few Senconds!');
+ require('child_process').exec('npm restart');
+ });
+}
setTimeout(function() { MakePush(); }, 20000);
\ No newline at end of file