Settings to script arguments
This commit is contained in:
parent
670eee501c
commit
0d1ae7ad66
10
bot.py
10
bot.py
@ -1,6 +1,7 @@
|
||||
import irc.bot, subprocess
|
||||
import irc.strings
|
||||
import psutil, platform
|
||||
from sys import argv
|
||||
|
||||
|
||||
def get_size(bytes, suffix="B"):
|
||||
@ -89,9 +90,12 @@ class TestBot(irc.bot.SingleServerIRCBot):
|
||||
|
||||
|
||||
def main():
|
||||
channel = '#main'
|
||||
nickname = 'TomasGlTestStatBot'
|
||||
server = 's1.tomas.gl'
|
||||
if len(argv) != 4:
|
||||
print('Usage: {} channel nickname server'.format(argv[0]))
|
||||
exit(1)
|
||||
channel = argv[1]
|
||||
nickname = argv[2]
|
||||
server = argv[3]
|
||||
bot = TestBot(channel, nickname, server)
|
||||
bot.start()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user