aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-24 08:37:42 +0000
committerGravatar jesopo2019-02-24 08:37:42 +0000
commit276d753711c148d5c25bcf9a5ed65a8472f2008b (patch)
tree7cb6a3333de5025d720710a8f4f6ca71ce831914
parentRename IRCLine.Line to IRCLine.SentLine, for clarity (diff)
signature
Change --verbose short to -V, add --version/-v, add IRCBot.VERSION
-rw-r--r--src/IRCBot.py2
-rwxr-xr-xstart.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/IRCBot.py b/src/IRCBot.py
index 843ef53d..2733db1f 100644
--- a/src/IRCBot.py
+++ b/src/IRCBot.py
@@ -2,6 +2,8 @@ import queue, os, select, socket, threading, time, traceback, typing, uuid
from src import EventManager, Exports, IRCServer, Logging, ModuleManager
from src import Socket, utils
+VERSION = "v1.2.0"
+
TRIGGER_RETURN = 1
TRIGGER_EXCEPTION = 2
diff --git a/start.py b/start.py
index 035e480e..4db8d5a1 100755
--- a/start.py
+++ b/start.py
@@ -26,11 +26,17 @@ arg_parser.add_argument("--log-dir", "-l",
arg_parser.add_argument("--add-server", "-a",
help="Add a new server", action="store_true")
-arg_parser.add_argument("--verbose", "-v", action="store_true")
+arg_parser.add_argument("--verbose", "-V", action="store_true")
arg_parser.add_argument("--log-level", "-L")
+arg_parser.add_argument("--version", "-v", action="store_true")
+
args = arg_parser.parse_args()
+if args.version:
+ print("BitBot %s" % IRCBot.VERSION)
+ sys.exit(0)
+
log_level = args.log_level
if not log_level:
log_level = "debug" if args.verbose else "info"