Settings to script arguments

This commit is contained in:
TomasGlgg committed 2021-10-21 20:19:40 +03:00
1 parent 670eee501c
commit 0d1ae7ad66
1 file changed
+7 -3
+7 -3
View File
@@ -1,6 +1,7 @@
import irc.bot, subprocess import irc.bot, subprocess
import irc.strings import irc.strings
import psutil, platform import psutil, platform
from sys import argv
def get_size(bytes, suffix="B"): def get_size(bytes, suffix="B"):
@@ -89,9 +90,12 @@ class TestBot(irc.bot.SingleServerIRCBot):
def main(): def main():
channel = '#main' if len(argv) != 4:
nickname = 'TomasGlTestStatBot' print('Usage: {} channel nickname server'.format(argv[0]))
server = 's1.tomas.gl' exit(1)
channel = argv[1]
nickname = argv[2]
server = argv[3]
bot = TestBot(channel, nickname, server) bot = TestBot(channel, nickname, server)
bot.start() bot.start()