[Logger] If another IRC server is used also change the LogLevel of that server

I've got to an issue, where the bot was logging me what I've asked to not log
This commit is contained in:
Julian Marcos 2021-12-19 13:45:25 +01:00 committed by Julian Jarabo
parent efbf1299f8
commit 150ca60dcf
No known key found for this signature in database
GPG Key ID: 937CED0727240E4A
1 changed files with 3 additions and 3 deletions

6
bot.py
View File

@ -17,12 +17,12 @@ class bot:
else:
print(msg);
async def handle(line):
if (line[0] == ':team.tilde.chat' and (line[1] == 'NOTICE' or line[1] == '001' or line[1] == '002' or line[1] == '003' or line[1] == '004' or line[1] == '005' or line[1] == '372' or line[1] == '251' or line[1] == '252' or line[1] == '253' or line[1] == '254' or line[1] == '255' or line[1] == '265' or line[1] == '266' or line[1] == '375' or line[1] == '376' or line[1] == '396') ):
if (line[0].endswith('.tilde.chat') and (line[1] == 'NOTICE' or line[1] == '001' or line[1] == '002' or line[1] == '003' or line[1] == '004' or line[1] == '005' or line[1] == '372' or line[1] == '251' or line[1] == '252' or line[1] == '253' or line[1] == '254' or line[1] == '255' or line[1] == '265' or line[1] == '266' or line[1] == '375' or line[1] == '376' or line[1] == '396') ):
loglevel = 450
elif line[0] == ':team.tilde.chat':
elif line[0].endswith('.tilde.chat'):
loglevel = 441
elif line[0] == ':NickServ!services@services.tilde.chat':
if (line[3] == ':This' or line[3] == ':nick,' or line[3] == ':please' or line[3] == ':If' or line[3] == ':Password'):
if (line[3] == ':This' or line[3] == ':nick,' or line[2] == ':please' or line[3] == ':If' or line[3] == ':Password'):
loglevel = 450
else:
loglevel = 441