From c5080b03f832822abe3ab80f7843a72b7bcb8cde Mon Sep 17 00:00:00 2001 From: examknow Date: Tue, 28 Apr 2020 13:57:41 -0500 Subject: [PATCH 1/2] add better topic change --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index b068479..52c5a01 100644 --- a/bot.py +++ b/bot.py @@ -161,8 +161,8 @@ def on_message(bot, channel, sender, message): pq = quotes[picked] print('Which is: ' + pq) bot.send_message(channel, 'Todays quote is: ' + str(pq)) - bot.send_message('ChanServ', 'topic ' + channel + ' ' + topic + ' | Quote of the day: ' + pq) - print('Announed it') + bot.send_line('TOPIC ' + channel + ' ' + pq) + print('Announced it') if buttbot == 1: message1 = message.lower() message1 = message.split(' ') From 21d9249287fc0d3b67243819a09ee2fbfa3333b3 Mon Sep 17 00:00:00 2001 From: examknow Date: Tue, 28 Apr 2020 14:02:27 -0500 Subject: [PATCH 2/2] adding operator tools --- bot.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bot.py b/bot.py index 52c5a01..c7e3ffc 100644 --- a/bot.py +++ b/bot.py @@ -111,6 +111,16 @@ def on_message(bot, channel, sender, message): print('Sent greeting') lastgreeter = sender for message_part in message.split(): + if message_part.startswith('!opme') and senderhost in chanops: + bot.send_line('MODE ' + channel + ' +o ' + sendernick) + + if message_part().startswith('!deopme') and senderhost in chanops: + bot.send_line('MODE ' + channel + ' -o ' + sendernick) + + if message_part().startswith('!kick') and senderhost in chanops: + arg = message.split(' ') + target = arg[1] + bot.send_line('KICK ' + channel + ' ' + target) if message_part.startswith("http://") and linkbot == 1 or message_part.startswith("https://") and linkbot == 1: print('Found link') html = requests.get(message_part).text