Settings to script arguments
This commit is contained in:
1 file changed
+7
-3
@@ -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()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user