From a7b0de90bfea2c6b44e69ccc1650fb693714f623 Mon Sep 17 00:00:00 2001 From: iou1name Date: Wed, 8 Jan 2020 07:51:00 -0500 Subject: [PATCH] remove naughty words --- modules/adminchannel.py | 7 ++++--- modules/away.py | 3 +-- modules/banhe.py | 6 +++--- modules/hangman.py | 2 +- modules/movie.py | 3 ++- modules/pingall.py | 5 ++--- modules/reload.py | 2 +- modules/remind.py | 13 ++++++------- modules/scramble.py | 2 +- modules/sed.py | 6 ++---- modules/seen.py | 4 ++-- modules/topic.py | 2 +- modules/url.py | 3 +-- modules/willilike.py | 3 +-- 14 files changed, 28 insertions(+), 33 deletions(-) diff --git a/modules/adminchannel.py b/modules/adminchannel.py index 11e04d8..ffd8039 100755 --- a/modules/adminchannel.py +++ b/modules/adminchannel.py @@ -14,7 +14,7 @@ op = ['~', '!', '@', '%'] @module.require_chanmsg @module.require_admin @module.commands('kick') -@module.example(".kick faggot being a faggot") +@module.example(".kick Rob It's time to stop.") def kick(bot, trigger): """ Kick a user from the channel. @@ -38,7 +38,7 @@ def kick(bot, trigger): @module.require_chanmsg @module.require_admin @module.commands('ban') -@module.example(".ban faggot") +@module.example(".ban Rob") def ban(bot, trigger): """ This give admins the ability to ban a user. @@ -56,7 +56,7 @@ def ban(bot, trigger): @module.require_chanmsg @module.require_admin @module.commands('unban') -@module.example(".unban faggot") +@module.example(".unban Rob") def unban(bot, trigger): """ This give admins the ability to unban a user. @@ -74,6 +74,7 @@ def unban(bot, trigger): @module.require_chanmsg @module.require_admin @module.commands('kickban') +@module.example(".kickban Rob It's time to stop.") def kickban(bot, trigger): """ This gives admins the ability to kickban a user. diff --git a/modules/away.py b/modules/away.py index 34b6f61..b633d4d 100755 --- a/modules/away.py +++ b/modules/away.py @@ -1,5 +1,4 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 """ Marks a user as away with an optional message and informs anyone who attempt to ping them of their away status. Goes away when the user talks again. diff --git a/modules/banhe.py b/modules/banhe.py index 0c829dd..38b177b 100755 --- a/modules/banhe.py +++ b/modules/banhe.py @@ -10,7 +10,7 @@ from module import commands, example, require_admin from tools import configureHostMask @commands('banhe') -@example('.banhe assfaggot 30m') +@example('.banhe Rob 30m') def banhe(bot, trigger): """ Bans he for a set period of time. Admins may set the period of time, @@ -32,7 +32,7 @@ def banhe(bot, trigger): bot.mode(trigger.channel, True, "b", mask=banmask) if period > 2592000: - bot.reply("It's too big, Onii-chan.") + bot.reply("Onii-chan, It's too big!") if not period or period > 2592000: return bot.msg(f"Banned \x0304{banhee}\x03 for \x0309∞\x03 seconds.") @@ -60,7 +60,7 @@ def banheall(bot, trigger): bot.mode(trigger.channel, True, "b", mask=banmask) if period > 2592000: - bot.reply("It's too big, Onii-chan.") + bot.reply("Onii-chan, It's too big!") if not period or period > 2592000: return bot.msg("Banned \x0304them all\x03 for \x0309∞\x03 seconds.") diff --git a/modules/hangman.py b/modules/hangman.py index 0890dc0..ebf9bff 100755 --- a/modules/hangman.py +++ b/modules/hangman.py @@ -34,7 +34,7 @@ def setup(bot): @commands("hangman", "hm") @example(".hangman --start") -@example(".hm anus") +@example(".hm substation") def hangman(bot, trigger): """ Plays hangman. --start [-s] to start a new game, otherwise words are diff --git a/modules/movie.py b/modules/movie.py index 787afe4..79a6551 100755 --- a/modules/movie.py +++ b/modules/movie.py @@ -157,7 +157,8 @@ def pickMovie(bot, trigger): @require_admin @commands('addmovie') -@example('.addmovie Gay Niggers From Outer Space') +@example('.addmovie Dr. Strangelove or: How I Learned to Stop Worrying and " + "Love the Bomb') def addMovie(bot, trigger): """ Adds the specified movie to the movie database. diff --git a/modules/pingall.py b/modules/pingall.py index 1e22e8a..bf75832 100755 --- a/modules/pingall.py +++ b/modules/pingall.py @@ -11,7 +11,6 @@ def pingAll(bot, trigger): attention, or just annoy them. """ nicks = list(bot.channels[trigger.channel].users.keys()) - for nigger in ["Ishd", "Ishd2", "Ishd_"]: - if nigger in nicks: - nicks.remove(nigger) + second_class_citizens = ["Ishd", "Ishd2", "Ishd_"] + nicks = [n for n in nicks if n not in second_class_citizens] bot.msg(" ".join(nicks)) diff --git a/modules/reload.py b/modules/reload.py index 26fe487..e173805 100755 --- a/modules/reload.py +++ b/modules/reload.py @@ -17,7 +17,7 @@ def f_reload(bot, trigger): return boy.reply("Reload what?") name = trigger.args[1] - if name == "*" or name.upper() == "ALL THE THINGS": + if name == "*": bot.load_modules() return bot.msg("done") diff --git a/modules/remind.py b/modules/remind.py index 28fc440..0046a69 100755 --- a/modules/remind.py +++ b/modules/remind.py @@ -148,23 +148,22 @@ def remind(bot, trigger): @commands('at') -@example('.at 13:47 Do your homework!') -@example('.at 16:30UTC-5 Do cocaine') -@example('.at 14:45:45 Remove dick from oven') +@example('.at 2012-12-21 18:00:00 End the world.') def at(bot, trigger): """ Gives you a reminder at the given time and date. Datetime must be in YYYY-MM-DD HH:MM:SS format. Only the bot's timezone is used. """ - if len(trigger.args) == 1: + if len(trigger.args) < 3: return bot.msg("Missing arguments for reminder command.") - if len(trigger.args) == 2: + if len(trigger.args) < 4: reminder = '' else: - reminder = ' '.join(trigger.args[2:]) + reminder = ' '.join(trigger.args[3:]) try: - at_time = datetime.strptime(trigger.args[1], '%Y-%m-%d %H:%M:%S') + at_time = datetime.strptime(' '.join(trigger.args[1:2]), + '%Y-%m-%d %H:%M:%S') except ValueError: return bot.msg("Datetime improperly formatted.") diff = at_time - datetime.now() diff --git a/modules/scramble.py b/modules/scramble.py index e02c575..8f3e9b1 100755 --- a/modules/scramble.py +++ b/modules/scramble.py @@ -48,7 +48,7 @@ def setup(bot): @commands("scramble", "sc") @example(".scramble --start") -@example(".sc anus") +@example(".sc substation") def scramble(bot, trigger): """ Plays scramble. --start [-s] to start a new game, otherwise arguments diff --git a/modules/sed.py b/modules/sed.py index 26704aa..523448c 100755 --- a/modules/sed.py +++ b/modules/sed.py @@ -1,9 +1,7 @@ #!/usr/bin/env python3 """ -Fulvia Spelling correction module - -This module will fix spelling errors if someone corrects them -using the sed notation (s///) commonly found in vi/vim. +Correct the last thing you or someone else said. Uses standard sed +substitute notation eg. s/search/replace/flags """ import re diff --git a/modules/seen.py b/modules/seen.py index fc6cc5f..bdc058f 100755 --- a/modules/seen.py +++ b/modules/seen.py @@ -53,8 +53,8 @@ def setup(bot): @rate(1) @commands('seen') -@example(".seen Nigger -l", "Last heard from Nigger at [1997-03-12 16:30:00] "\ - +"with \"Just going to the store for some smokes babe I'll be right back\"") +@example(".seen Dad -l", "Last heard from Dad at [1997-03-12 16:30:00] "\ + +"with \"Just going to the store for some cigarettes I'll be right back\"") @example(".seen Soma_QM", "I haven't seen Soma_QM") def seen(bot, trigger): """ diff --git a/modules/topic.py b/modules/topic.py index 00f4b45..f71c67b 100755 --- a/modules/topic.py +++ b/modules/topic.py @@ -43,7 +43,7 @@ def topic(bot, trigger): @commands('addtopic') -@example('.addtopic Daily reminder to kill all cia niggers on site.') +@example(".addtopic We're discussing penises, would you like to join?") def addTopic(bot, trigger): """ Adds the specified topic to the topic database. diff --git a/modules/url.py b/modules/url.py index 6da098b..7cb6df3 100755 --- a/modules/url.py +++ b/modules/url.py @@ -10,7 +10,7 @@ import requests from module import hook, url_callback -HEADERS = {"User-Agent": "bix nood gimme the title", "Range": "bytes=0-4096"} +HEADERS = {"User-Agent": "Give me your data.", "Range": "bytes=0-4096"} @url_callback('puu.sh/') def get_puush_fname(bot, url): @@ -70,6 +70,5 @@ def title_auto(bot, trigger): title = res.text[res.text.find("")+7:res.text.find("")] title = HTMLParser().unescape(title) title = title.replace("\n","").strip() - #title = title.encode("windows_1252").decode("utf-8") hostname = urlparse(url).hostname bot.msg(f"[ \x0310{title} \x03] - \x0304{hostname}") diff --git a/modules/willilike.py b/modules/willilike.py index 7b8e006..f36e66a 100755 --- a/modules/willilike.py +++ b/modules/willilike.py @@ -12,7 +12,6 @@ def willilike(bot, trigger): bot.reply("No.") @commands('upvote') -@example('.willilike Banished Quest') def upvote(bot, trigger): - """An advanced AI that will determine if you like something.""" + """Upvotes a post made by someone.""" bot.msg(trigger.nick + " upvoted this post!")