diff --git a/plugins/8ball.py b/plugins/8ball.py index 891e045..3d9385b 100755 --- a/plugins/8ball.py +++ b/plugins/8ball.py @@ -36,6 +36,6 @@ answers = [g + "As I see it, yes", @hook.command('8ball') def eightball(inp, me=None): - ".8ball -- The all knowing magic eight ball, " \ + "8ball -- The all knowing magic eight ball, " \ "in electronic form. Ask and it shall be answered!" me("shakes the magic 8 ball... %s" % (random.choice(answers))) diff --git a/plugins/admin.py b/plugins/admin.py index 125e34e..c858b03 100755 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -10,7 +10,7 @@ import subprocess @hook.command(adminonly=True) def addadmin(inp, notice=None, bot=None, config=None): - ".addadmin -- Make an admin. " \ + "addadmin -- Make an admin. " \ "(you can add multiple admins at once)" targets = inp.split() for target in targets: @@ -26,7 +26,7 @@ def addadmin(inp, notice=None, bot=None, config=None): @hook.command(adminonly=True) def deladmin(inp, notice=None, bot=None, config=None): - ".deladmin -- Make a non-admin." \ + "deladmin -- Make a non-admin." \ "(you can delete multiple admins at once)" targets = inp.split() for target in targets: @@ -42,14 +42,14 @@ def deladmin(inp, notice=None, bot=None, config=None): @hook.command(autohelp=False) def channels(inp, conn=None): - ".channels -- Lists the channels that the bot is in." + "channels -- Lists the channels that the bot is in." return "I am in these channels: %s" % ", ".join(conn.channels) @hook.command("quit", autohelp=False, adminonly=True) @hook.command(autohelp=False, adminonly=True) def stop(inp, nick=None, conn=None): - ".stop [reason] -- Kills the bot with [reason] as its quit message." + "stop [reason] -- Kills the bot with [reason] as its quit message." if inp: conn.cmd("QUIT", ["Killed by %s (%s)" % (nick, inp)]) else: @@ -60,7 +60,7 @@ def stop(inp, nick=None, conn=None): @hook.command(autohelp=False, adminonly=True) def restart(inp, nick=None, conn=None): - ".restart [reason] -- Restarts the bot with [reason] as its quit message." + "restart [reason] -- Restarts the bot with [reason] as its quit message." if inp: conn.cmd("QUIT", ["Restarted by %s (%s)" % (nick, inp)]) else: @@ -71,20 +71,20 @@ def restart(inp, nick=None, conn=None): @hook.command(autohelp=False, adminonly=True) def clearlogs(inp, input=None): - ".clearlogs -- Clears the bots log(s)." + "clearlogs -- Clears the bots log(s)." subprocess.call(["./cloudbot", "clear"]) @hook.command(adminonly=True) def join(inp, conn=None, notice=None): - ".join -- Joins ." + "join -- Joins ." notice("Attempting to join %s..." % inp) conn.join(inp) @hook.command(autohelp=False, adminonly=True) def part(inp, conn=None, chan=None, notice=None): - ".part -- Leaves ." \ + "part -- Leaves ." \ "If [channel] is blank the bot will leave the " \ "channel the command was used in." if inp: @@ -97,7 +97,7 @@ def part(inp, conn=None, chan=None, notice=None): @hook.command(autohelp=False, adminonly=True) def cycle(inp, conn=None, chan=None, notice=None): - ".cycle -- Cycles ." \ + "cycle -- Cycles ." \ "If [channel] is blank the bot will cycle the " \ "channel the command was used in." if inp: @@ -111,7 +111,7 @@ def cycle(inp, conn=None, chan=None, notice=None): @hook.command(adminonly=True) def nick(inp, input=None, notice=None, conn=None): - ".nick -- Changes the bots nickname to ." + "nick -- Changes the bots nickname to ." if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()): notice("Invalid username!") return @@ -121,14 +121,14 @@ def nick(inp, input=None, notice=None, conn=None): @hook.command(adminonly=True) def raw(inp, conn=None, notice=None): - ".raw -- Sends a RAW IRC command." + "raw -- Sends a RAW IRC command." notice("Raw command sent.") conn.send(inp) @hook.command(adminonly=True) def say(inp, conn=None, chan=None, notice=None): - ".say [channel] -- Makes the bot say in [channel]. " \ + "say [channel] -- Makes the bot say in [channel]. " \ "If [channel] is blank the bot will say the in the channel " \ "the command was used in." inp = inp.split(" ") @@ -150,7 +150,7 @@ def say(inp, conn=None, chan=None, notice=None): @hook.command("act", adminonly=True) @hook.command(adminonly=True) def me(inp, conn=None, chan=None, notice=None): - ".me [channel] -- Makes the bot act out in [channel]. " \ + "me [channel] -- Makes the bot act out in [channel]. " \ "If [channel] is blank the bot will act the in the channel the " \ "command was used in." inp = inp.split(" ") diff --git a/plugins/bf.py b/plugins/bf.py index 32e9f3c..0290279 100755 --- a/plugins/bf.py +++ b/plugins/bf.py @@ -14,7 +14,7 @@ MAX_STEPS = 1000000 @hook.command('brainfuck') @hook.command def bf(inp): - ".bf -- Executes as Brainfuck code." + "bf -- Executes as Brainfuck code." program = re.sub('[^][<>+-.,]', '', inp) diff --git a/plugins/bitcoin.py b/plugins/bitcoin.py index 1308ae8..52835da 100755 --- a/plugins/bitcoin.py +++ b/plugins/bitcoin.py @@ -3,7 +3,7 @@ from util import http, hook @hook.command(autohelp=False) def bitcoin(inp, say=None): - ".bitcoin -- Gets current exchange rate for bitcoins from mtgox." + "bitcoin -- Gets current exchange rate for bitcoins from mtgox." data = http.get_json("https://mtgox.com/code/data/ticker.php") ticker = data['ticker'] say("Current: \x0307$%(buy).2f\x0f - High: \x0307$%(high).2f\x0f" diff --git a/plugins/choose.py b/plugins/choose.py index 1ba5b2e..c04c20f 100755 --- a/plugins/choose.py +++ b/plugins/choose.py @@ -6,7 +6,7 @@ from util import hook @hook.command def choose(inp): - ".choose , [choice2], [choice3], [choice4], ... -- " \ + "choose , [choice2], [choice3], [choice4], ... -- " \ "Randomly picks one of the given choices." c = re.findall(r'([^,]+)', inp) diff --git a/plugins/coin.py b/plugins/coin.py index c03d414..01e8b80 100755 --- a/plugins/coin.py +++ b/plugins/coin.py @@ -16,7 +16,7 @@ def flip_simple(count): @hook.command(autohelp=False) def coin(inp): - ".coin [amount] -- Flips [amount] of coins." + "coin [amount] -- Flips [amount] of coins." # checking for valid input. if valid input [count=inp], # if invalid [return error], if no input [count=1] if inp.isdigit(): diff --git a/plugins/cypher.py b/plugins/cypher.py index 7e61d74..ddff3dc 100755 --- a/plugins/cypher.py +++ b/plugins/cypher.py @@ -11,7 +11,7 @@ len_chars = len(chars) @hook.command def cypher(inp): - ".cypher -- Cyphers with ." + "cypher -- Cyphers with ." passwd = inp.split(" ")[0] len_passwd = len(passwd) @@ -38,7 +38,7 @@ def cypher(inp): @hook.command def decypher(inp): - ".decypher -- Decyphers with ." + "decypher -- Decyphers with ." passwd = inp.split(" ")[0] len_passwd = len(passwd) diff --git a/plugins/dice.py b/plugins/dice.py index 2e688bd..93312cb 100755 --- a/plugins/dice.py +++ b/plugins/dice.py @@ -36,8 +36,8 @@ def nrolls(count, n): #@hook.regex(valid_diceroll, re.I) @hook.command def dice(inp): - ".dice -- Simulates dicerolls. Example of :" \ - " '.dice 2d20-d5+4 roll 2'. D20s, subtract 1D5, add 4" + "dice -- Simulates dicerolls. Example of :" \ + " 'dice 2d20-d5+4 roll 2'. D20s, subtract 1D5, add 4" try: # if inp is a re.match object... (inp, desc) = inp.groups() diff --git a/plugins/dictionary.py b/plugins/dictionary.py index 2562ceb..2bd5ae6 100755 --- a/plugins/dictionary.py +++ b/plugins/dictionary.py @@ -7,7 +7,7 @@ from util import http @hook.command('dictionary') @hook.command def define(inp): - ".define -- Fetches definition of ." + "define -- Fetches definition of ." url = 'http://ninjawords.com/' @@ -67,7 +67,7 @@ def define(inp): @hook.command('e') @hook.command def etymology(inp): - ".etymology -- Retrieves the etymology of ." + "etymology -- Retrieves the etymology of ." url = 'http://www.etymonline.com/index.php' diff --git a/plugins/down.py b/plugins/down.py index a8a3fe2..aab75b9 100755 --- a/plugins/down.py +++ b/plugins/down.py @@ -5,7 +5,7 @@ from util import hook, http @hook.command def down(inp): - ".down -- Checks if the site at is up or down." + "down -- Checks if the site at is up or down." if 'http://' not in inp: inp = 'http://' + inp diff --git a/plugins/drama.py b/plugins/drama.py index 0461497..47df5e2 100755 --- a/plugins/drama.py +++ b/plugins/drama.py @@ -6,7 +6,7 @@ ed_url = "http://encyclopediadramatica.se/" @hook.command def drama(inp): - ".drama -- Gets the first paragraph of" \ + "drama -- Gets the first paragraph of" \ " the Encyclopedia Dramatica article on ." j = http.get_json(api_url, search=inp) diff --git a/plugins/fact.py b/plugins/fact.py index 82bec4e..64d2387 100755 --- a/plugins/fact.py +++ b/plugins/fact.py @@ -7,7 +7,7 @@ from BeautifulSoup import BeautifulSoup @hook.command(autohelp=False) def fact(inp, say=False, nick=False): - ".fact -- Gets a random fact from OMGFACTS." + "fact -- Gets a random fact from OMGFACTS." fact = None while fact is None: diff --git a/plugins/factoids.py b/plugins/factoids.py index c9c7789..8da1158 100755 --- a/plugins/factoids.py +++ b/plugins/factoids.py @@ -46,7 +46,7 @@ def multiwordReplace(text, wordDic): @hook.command("r", adminonly=True) @hook.command(adminonly=True) def remember(inp, nick='', db=None, say=None, input=None, notice=None): - ".remember [+] -- Remembers with . Add +" + "remember [+] -- Remembers with . Add +" " to to append." db_init(db) @@ -89,7 +89,7 @@ def remember(inp, nick='', db=None, say=None, input=None, notice=None): @hook.command("f", adminonly=True) @hook.command(adminonly=True) def forget(inp, db=None, input=None, notice=None): - ".forget -- Forgets a remembered ." + "forget -- Forgets a remembered ." db_init(db) data = get_memory(db, inp) @@ -106,7 +106,7 @@ def forget(inp, db=None, input=None, notice=None): @hook.command() def info(inp, notice=None, db=None): - ".info -- Shows the source of a factoid." + "info -- Shows the source of a factoid." db_init(db) diff --git a/plugins/feelings.py b/plugins/feelings.py index 99a7dec..f8906b1 100755 --- a/plugins/feelings.py +++ b/plugins/feelings.py @@ -16,7 +16,7 @@ with open("plugins/data/flirts.txt") as f: @hook.command def insult(inp, nick=None, me=None, conn=None): - ".insult -- Makes the bot insult ." + "insult -- Makes the bot insult ." target = inp.strip() if not re.match(nick_re, target): @@ -34,7 +34,7 @@ def insult(inp, nick=None, me=None, conn=None): @hook.command def flirt(inp, nick=None, me=None, conn=None): - ".flirt -- Make the bot flirt with ." + "flirt -- Make the bot flirt with ." target = inp.strip() if not re.match(nick_re, target): diff --git a/plugins/flip.py b/plugins/flip.py index 14ad83e..2163321 100755 --- a/plugins/flip.py +++ b/plugins/flip.py @@ -4,7 +4,7 @@ import random @hook.command def flip(inp, flip_count=0, say=None): - ".flip -- Flips over." + "flip -- Flips over." guy = unicode(random.choice(flips), 'utf8') inp = inp.lower() inp = inp[::-1] diff --git a/plugins/fmylife.py b/plugins/fmylife.py index d49ef60..7b9b2cc 100755 --- a/plugins/fmylife.py +++ b/plugins/fmylife.py @@ -26,7 +26,7 @@ refresh_cache() @hook.command(autohelp=False) def fml(inp, reply=None): - ".fml -- Gets a random quote from fmyfife.com." + "fml -- Gets a random quote from fmyfife.com." # grab the last item in the fml cache and remove it id, text = fml_cache.popitem() diff --git a/plugins/fortune.py b/plugins/fortune.py index cb1d965..ef0390a 100755 --- a/plugins/fortune.py +++ b/plugins/fortune.py @@ -13,5 +13,5 @@ with open("plugins/data/fortunes.txt") as f: @hook.command(autohelp=False) def fortune(inp): - ".fortune -- Fortune cookies on demand." + "fortune -- Fortune cookies on demand." return random.choice(fortunes) diff --git a/plugins/gcalc.py b/plugins/gcalc.py index 68333b1..52c6644 100755 --- a/plugins/gcalc.py +++ b/plugins/gcalc.py @@ -7,7 +7,7 @@ from BeautifulSoup import BeautifulSoup @hook.command("math") @hook.command def calc(inp): - ".calc -- Calculate with Google Calc." + "calc -- Calculate with Google Calc." white_re = re.compile(r'\s+') diff --git a/plugins/gitio.py b/plugins/gitio.py index 99d4e41..9844282 100755 --- a/plugins/gitio.py +++ b/plugins/gitio.py @@ -5,7 +5,7 @@ import urllib2 @hook.command def gitio(inp): - ".gitio [code] -- Shorten Github URLs with git.io. [code] is" \ + "gitio [code] -- Shorten Github URLs with git.io. [code] is" \ " a optional custom short code." split = inp.split(" ") url = split[0] diff --git a/plugins/google.py b/plugins/google.py index afa97e1..1716f91 100755 --- a/plugins/google.py +++ b/plugins/google.py @@ -15,7 +15,7 @@ def api_get(kind, query): @hook.command('gis') @hook.command def googleimage(inp): - ".gis -- Returns first Google Image result for ." + "gis -- Returns first Google Image result for ." parsed = api_get('images', inp) if not 200 <= parsed['responseStatus'] < 300: @@ -31,7 +31,7 @@ def googleimage(inp): @hook.command('g') @hook.command def google(inp): - ".google -- Returns first google search result for ." + "google -- Returns first google search result for ." parsed = api_get('web', inp) if not 200 <= parsed['responseStatus'] < 300: diff --git a/plugins/hash.py b/plugins/hash.py index 5d0a7d8..ea4dc14 100755 --- a/plugins/hash.py +++ b/plugins/hash.py @@ -4,30 +4,30 @@ from util import hook @hook.command def md5(inp): - ".hash -- Returns a md5 hash of ." + "hash -- Returns a md5 hash of ." return hashlib.md5(inp).hexdigest() @hook.command def sha1(inp): - ".hash -- Returns a sha1 hash of ." + "hash -- Returns a sha1 hash of ." return hashlib.sha1(inp).hexdigest() @hook.command def sha256(inp): - ".hash -- Returns a sha256 hash of ." + "hash -- Returns a sha256 hash of ." return hashlib.sha256(inp).hexdigest() @hook.command def sha512(inp): - ".hash -- Returns a sha512 hash of ." + "hash -- Returns a sha512 hash of ." return hashlib.sha512(inp).hexdigest() @hook.command def hash(inp): - ".hash -- Returns hashes of ." + .hash -- Returns hashes of ." return ', '.join(x + ": " + getattr(hashlib, x)(inp).hexdigest() for x in ['md5', 'sha1', 'sha256']) diff --git a/plugins/help.py b/plugins/help.py index fe0d478..fbb36a0 100755 --- a/plugins/help.py +++ b/plugins/help.py @@ -4,7 +4,7 @@ from util import hook @hook.command(autohelp=False) def help(inp, say=None, notice=None, input=None, conn=None, bot=None): - ".help -- Gives a list of commands/help for a command." + "help -- Gives a list of commands/help for a command." funcs = {} disabled = bot.config.get('disabled_plugins', []) diff --git a/plugins/ignore.py b/plugins/ignore.py index 146f691..6432ac6 100755 --- a/plugins/ignore.py +++ b/plugins/ignore.py @@ -21,7 +21,7 @@ def ignoresieve(bot, input, func, type, args): @hook.command(autohelp=False) def ignored(inp, notice=None, bot=None): - ".ignored -- Lists ignored channels/nicks/hosts." + "ignored -- Lists ignored channels/nicks/hosts." ignorelist = bot.config["plugins"]["ignore"]["ignored"] if ignorelist: notice("Ignored channels/nicks/hosts are: %s" % ", ".join(ignorelist)) @@ -32,7 +32,7 @@ def ignored(inp, notice=None, bot=None): @hook.command(adminonly=True) def ignore(inp, notice=None, bot=None, config=None): - ".ignore -- Makes the bot ignore ." + "ignore -- Makes the bot ignore ." target = inp.lower() ignorelist = bot.config["plugins"]["ignore"]["ignored"] if target in ignorelist: @@ -47,7 +47,7 @@ def ignore(inp, notice=None, bot=None, config=None): @hook.command(adminonly=True) def unignore(inp, notice=None, bot=None, config=None): - ".unignore -- Makes the bot listen to"\ + "unignore -- Makes the bot listen to"\ " ." target = inp.lower() ignorelist = bot.config["plugins"]["ignore"]["ignored"] diff --git a/plugins/imdb.py b/plugins/imdb.py index 00a445b..2fd1123 100755 --- a/plugins/imdb.py +++ b/plugins/imdb.py @@ -5,7 +5,7 @@ from util import hook, http @hook.command def imdb(inp): - ".imdb -- Gets information about from IMDb." + "imdb -- Gets information about from IMDb." content = http.get_json("http://www.imdbapi.com/", t=inp) diff --git a/plugins/info.py b/plugins/info.py index ea9acfb..b19c9e6 100644 --- a/plugins/info.py +++ b/plugins/info.py @@ -2,7 +2,7 @@ from util import hook @hook.command(autohelp=False) def admins(inp, notice=None, bot=None): - ".admins -- Lists bot's admins." + "admins -- Lists bot's admins." if bot.config["admins"]: notice("Admins are: %s." % ", ".join(bot.config["admins"])) else: @@ -12,5 +12,5 @@ def admins(inp, notice=None, bot=None): @hook.command(autohelp=False) def prefix(inp, notice=False, conn=False): - ".prefix -- Shows the bot's command prefix" + "prefix -- Shows the bot's command prefix" notice("The prefix is: \"%s\"" % conn.conf["command_prefix"]) \ No newline at end of file diff --git a/plugins/lastfm.py b/plugins/lastfm.py index b51ae7e..b55d99b 100755 --- a/plugins/lastfm.py +++ b/plugins/lastfm.py @@ -4,7 +4,7 @@ from datetime import datetime @hook.command('l', autohelp=False) @hook.command(autohelp=False) def lastfm(inp, nick='', say=None, db=None, bot=None): - ".lastfm [user] [dontsave] -- Displays the now playing (or last played)" \ + "lastfm [user] [dontsave] -- Displays the now playing (or last played)" \ " track of LastFM user [user]." api_key = bot.config.get("api_keys", {}).get("lastfm") if not api_key: diff --git a/plugins/mcitems.py b/plugins/mcitems.py index 07fdb1a..090c97f 100755 --- a/plugins/mcitems.py +++ b/plugins/mcitems.py @@ -51,7 +51,7 @@ with open("plugins/data/itemids.txt") as f: @hook.command("id") @hook.command def itemid(input, reply=None): - ".itemid/.id -- gets the id from an item or vice versa" + "itemid -- gets the id from an item or vice versa" input = input.lower().strip() if input == "": @@ -84,7 +84,7 @@ def itemid(input, reply=None): @hook.command("craft") @hook.command def recipe(input, reply=None): - ".recipe/.craft -- gets the crafting recipe for an item" + "recipe -- gets the crafting recipe for an item" input = input.lower().strip() results = [] diff --git a/plugins/mctools.py b/plugins/mctools.py index 3da6ef0..87676fa 100755 --- a/plugins/mctools.py +++ b/plugins/mctools.py @@ -25,7 +25,7 @@ def mcping_connect(host, port): @hook.command(autohelp=False) def mcstatus(inp, bot=None): - ".mcstatus -- Checks the status of Minecraft's login servers." + "mcstatus -- Checks the status of Minecraft's login servers." username = bot.config.get("api_keys", {}).get("mc_user", None) password = bot.config.get("api_keys", {}).get("mc_pass", None) if password is None: @@ -42,7 +42,7 @@ def mcstatus(inp, bot=None): @hook.command def mclogin(inp, say=None): - ".mclogin -- Attempts to log in to Minecraft with" \ + "mclogin -- Attempts to log in to Minecraft with" \ " and (This is NOT logged)." inp = inp.split(" ") username = inp[0] @@ -61,7 +61,7 @@ def mclogin(inp, say=None): @hook.command def mcpaid(inp): - ".mcpaid -- Checks if has a" \ + "mcpaid -- Checks if has a" \ " premium Minecraft account." login = http.get("http://www.minecraft.net/haspaid.jsp", user=inp) @@ -73,7 +73,7 @@ def mcpaid(inp): @hook.command def mcping(inp): - ".mcping [:port] - Ping a Minecraft server to check status." + "mcping [:port] - Ping a Minecraft server to check status." inp = inp.strip().split(" ")[0] if ":" in inp: diff --git a/plugins/metacritic.py b/plugins/metacritic.py index 543d69d..0245115 100755 --- a/plugins/metacritic.py +++ b/plugins/metacritic.py @@ -9,7 +9,7 @@ from util import hook, http @hook.command('mc') @hook.command def metacritic(inp): - ".mc [all|movie|tv|album|x360|ps3|pc|ds|wii] -- Gets rating for <title> from metacritic on the specified medium." + "mc [all|movie|tv|album|x360|ps3|pc|ds|wii] <title> -- Gets rating for <title> from metacritic on the specified medium." # if the results suck, it's metacritic's fault diff --git a/plugins/munge.py b/plugins/munge.py index e3fe752..1c6aadc 100755 --- a/plugins/munge.py +++ b/plugins/munge.py @@ -6,7 +6,7 @@ from util import hook @hook.command def munge(inp, munge_count=0): - ".munge <text> -- Munges up <text>." + "munge <text> -- Munges up <text>." reps = 0 for n in xrange(len(inp)): rep = character_replacements.get(inp[n]) diff --git a/plugins/namegen.py b/plugins/namegen.py index 8c15ba5..aa8baad 100755 --- a/plugins/namegen.py +++ b/plugins/namegen.py @@ -6,8 +6,8 @@ from util.text import get_text_list @hook.command(autohelp=False) def namegen(inp, notice=None): - ".namegen [modules] -- Generates some names using the chosen modules. " \ - "'.namegen list' will display a list of all modules." + "namegen [modules] -- Generates some names using the chosen modules. " \ + "'namegen list' will display a list of all modules." gen = molecular.Molecule() diff --git a/plugins/op.py b/plugins/op.py index 28e96ad..63e8668 100755 --- a/plugins/op.py +++ b/plugins/op.py @@ -4,7 +4,7 @@ from util import hook @hook.command(adminonly=True) def topic(inp, conn=None, chan=None, notice=None): - ".topic [channel] <topic> -- Change the topic of a channel." + "topic [channel] <topic> -- Change the topic of a channel." inp = inp.split(" ") if inp[0][0] == "#": out = "PRIVMSG %s :%s" % (inp[0], message) @@ -15,7 +15,7 @@ def topic(inp, conn=None, chan=None, notice=None): @hook.command(adminonly=True) def kick(inp, chan=None, conn=None, notice=None): - ".kick [channel] <user> [reason] -- Makes the bot kick <user> in [channel] "\ + "kick [channel] <user> [reason] -- Makes the bot kick <user> in [channel] "\ "If [channel] is blank the bot will kick the <user> in "\ "the channel the command was used in." inp = inp.split(" ") @@ -45,7 +45,7 @@ def kick(inp, chan=None, conn=None, notice=None): @hook.command(adminonly=True) def ban(inp, conn=None, chan=None, notice=None): - ".ban [channel] <user> -- Makes the bot ban <user> in [channel]. "\ + "ban [channel] <user> -- Makes the bot ban <user> in [channel]. "\ "If [channel] is blank the bot will ban <user> in "\ "the channel the command was used in." inp = inp.split(" ") @@ -62,7 +62,7 @@ def ban(inp, conn=None, chan=None, notice=None): @hook.command(adminonly=True) def unban(inp, conn=None, chan=None, notice=None): - ".unban [channel] <user> -- Makes the bot unban <user> in [channel]. "\ + "unban [channel] <user> -- Makes the bot unban <user> in [channel]. "\ "If [channel] is blank the bot will unban <user> in "\ "the channel the command was used in." inp = inp.split(" ") @@ -79,7 +79,7 @@ def unban(inp, conn=None, chan=None, notice=None): @hook.command(adminonly=True) def kickban(inp, chan=None, conn=None, notice=None): - ".kickban [channel] <user> [reason] -- Makes the bot kickban <user> in [channel] "\ + "kickban [channel] <user> [reason] -- Makes the bot kickban <user> in [channel] "\ "If [channel] is blank the bot will kickban the <user> in "\ "the channel the command was used in." inp = inp.split(" ") diff --git a/plugins/password.py b/plugins/password.py index f1fcb08..af17532 100755 --- a/plugins/password.py +++ b/plugins/password.py @@ -53,6 +53,6 @@ def gen_password(types): @hook.command def password(inp, notice=None): - ".password <length> [types] -- Generates a password of <length> (default 10). [types] can include 'alpha', 'no caps', 'numeric', 'symbols' or any combination of the types, eg. 'numbers symbols'" + "password <length> [types] -- Generates a password of <length> (default 10). [types] can include 'alpha', 'no caps', 'numeric', 'symbols' or any combination of the types, eg. 'numbers symbols'" password = gen_password(inp) notice(password) diff --git a/plugins/ping.py b/plugins/ping.py index 67f76dd..9692217 100755 --- a/plugins/ping.py +++ b/plugins/ping.py @@ -9,7 +9,7 @@ ping_regex = re.compile(r"(\d+.\d+)/(\d+.\d+)/(\d+.\d+)/(\d+.\d+)") @hook.command def ping(inp, reply=None): - ".ping <host> [count] -- Pings <host> [count] times." + "ping <host> [count] -- Pings <host> [count] times." if os.name == "nt": return "Sorry, this command is not supported on Windows systems." diff --git a/plugins/potato.py b/plugins/potato.py index aa8b35c..f6afaf4 100755 --- a/plugins/potato.py +++ b/plugins/potato.py @@ -7,7 +7,7 @@ potatoes = ['AC Belmont', 'AC Blue Pride', 'AC Brador', 'AC Chaleur', 'AC Domino @hook.command def potato(inp, me=None, input=None): - ".potato <user> - Makes <user> a tasty little potato." + "potato <user> - Makes <user> a tasty little potato." inp = inp.strip() if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()): diff --git a/plugins/pyexec.py b/plugins/pyexec.py index 91f592b..dc77864 100755 --- a/plugins/pyexec.py +++ b/plugins/pyexec.py @@ -8,7 +8,7 @@ re_lineends = re.compile(r'[\r\n]*') @hook.command def python(inp): - ".python <prog> -- Executes <prog> as Python code." + "python <prog> -- Executes <prog> as Python code." inp = inp.replace("~n", "\n") diff --git a/plugins/quote.py b/plugins/quote.py index d1a49b6..beaa312 100755 --- a/plugins/quote.py +++ b/plugins/quote.py @@ -124,7 +124,7 @@ def get_quote_by_chan(db, chan, num=False): @hook.command('q') @hook.command def quote(inp, nick='', chan='', db=None, notice=None): - ".quote [#chan] [nick] [#n]/.quote add <nick> <msg> -- Gets " \ + "quote [#chan] [nick] [#n]/.quote add <nick> <msg> -- Gets " \ "random or [#n]th quote by <nick> or from <#chan>/adds quote." create_table_if_not_exists(db) diff --git a/plugins/seen.py b/plugins/seen.py index d85c63a..bfda3fa 100755 --- a/plugins/seen.py +++ b/plugins/seen.py @@ -27,7 +27,7 @@ def seen_sieve(paraml, input=None, db=None, bot=None): @hook.command def seen(inp, nick='', chan='', db=None, input=None): - ".seen <nick> -- Tell when a nickname was last in active in one of this bot's channels." + "seen <nick> -- Tell when a nickname was last in active in one of this bot's channels." if input.conn.nick.lower() == inp.lower(): return "You need to get your eyes checked." diff --git a/plugins/shorten.py b/plugins/shorten.py index 88485e4..7d57a0e 100755 --- a/plugins/shorten.py +++ b/plugins/shorten.py @@ -7,7 +7,7 @@ from util.web import bitly, ShortenError @hook.command def shorten(inp, bot=None): - ".shorten <url> - Makes an j.mp/bit.ly shortlink to the url provided." + "shorten <url> - Makes an j.mp/bit.ly shortlink to the url provided." api_user = bot.config.get("api_keys", {}).get("bitly_user", None) api_key = bot.config.get("api_keys", {}).get("bitly_api", None) if api_key is None: diff --git a/plugins/slogan.py b/plugins/slogan.py index 711fe6c..3feb786 100755 --- a/plugins/slogan.py +++ b/plugins/slogan.py @@ -10,7 +10,7 @@ def sloganize(word): @hook.command("slogan") def sloganizr(inp, nick=None, say=None, input=None): - ".slogan <word> -- Makes a slogan for <word>." + "slogan <word> -- Makes a slogan for <word>." slogan = sloganize(inp) slogan = misc.strip_html(slogan) diff --git a/plugins/snopes.py b/plugins/snopes.py index 51a8ecb..f0fe7bd 100755 --- a/plugins/snopes.py +++ b/plugins/snopes.py @@ -8,7 +8,7 @@ search_url = "http://search.atomz.com/search/?sp_a=00062d45-sp00000000" @hook.command def snopes(inp): - ".snopes <topic> -- Searches snopes for an urban legend about <topic>." + "snopes <topic> -- Searches snopes for an urban legend about <topic>." search_page = http.get_html(search_url, sp_q=inp, sp_c="1") result_urls = search_page.xpath("//a[@target='_self']/@href") diff --git a/plugins/spellcheck.py b/plugins/spellcheck.py index f70f7bb..f18f8fb 100755 --- a/plugins/spellcheck.py +++ b/plugins/spellcheck.py @@ -7,7 +7,7 @@ locale = "en_US" @hook.command("spellcheck") def spell(inp): - ".spell <word> -- Check spelling of <word>." + "spell <word> -- Check spelling of <word>." word = inp if ' ' in word: diff --git a/plugins/stock.py b/plugins/stock.py index c598d9e..87d006b 100755 --- a/plugins/stock.py +++ b/plugins/stock.py @@ -5,7 +5,7 @@ from util import hook, http @hook.command def stock(inp): - ".stock <symbol> -- Gets information about stock symbol <symbol>." + "stock <symbol> -- Gets information about stock symbol <symbol>." url = 'http://www.google.com/ig/api?stock=%s' diff --git a/plugins/system.py b/plugins/system.py index 9eb0639..744ca72 100755 --- a/plugins/system.py +++ b/plugins/system.py @@ -17,7 +17,7 @@ def convert_kilobytes(kilobytes): @hook.command(autohelp=False) def system(inp): - ".system -- Retrieves information about the host system." + "system -- Retrieves information about the host system." hostname = platform.node() os = platform.platform() python_imp = platform.python_implementation() @@ -31,7 +31,7 @@ def system(inp): @hook.command(autohelp=False) def memory(inp): - ".memory -- Displays the bot's current memory usage." + "memory -- Displays the bot's current memory usage." if os.name == "posix": # get process info status_file = open('/proc/self/status').read() @@ -63,7 +63,7 @@ def memory(inp): @hook.command(autohelp=False) def uptime(inp, bot=None): - ".uptime -- Shows the bot's uptime." + "uptime -- Shows the bot's uptime." uptime_raw = round(time.time() - bot.start_time) uptime = timedelta(seconds=uptime_raw) return "Uptime: \x02%s\x02" % uptime @@ -71,5 +71,5 @@ def uptime(inp, bot=None): @hook.command(autohelp=False) def pid(inp): - ".pid -- Prints the bot's PID." + "pid -- Prints the bot's PID." return "PID: \x02%s\x02" % os.getpid() diff --git a/plugins/tell.py b/plugins/tell.py index 22e0599..9523863 100755 --- a/plugins/tell.py +++ b/plugins/tell.py @@ -50,7 +50,7 @@ def tellinput(paraml, input=None, notice=None, db=None, bot=None, nick=None): @hook.command(autohelp=False) def showtells(inp, nick='', chan='', notice=None, db=None): - ".showtells -- View all pending tell messages (sent in a notice)." + "showtells -- View all pending tell messages (sent in a notice)." db_init(db) @@ -72,7 +72,7 @@ def showtells(inp, nick='', chan='', notice=None, db=None): @hook.command def tell(inp, nick='', chan='', db=None, input=None, notice=None): - ".tell <nick> <message> -- Relay <message> to <nick> when <nick> is around." + "tell <nick> <message> -- Relay <message> to <nick> when <nick> is around." query = inp.split(' ', 1) if len(query) != 2: diff --git a/plugins/time.py b/plugins/time.py index 9459733..c9fec63 100755 --- a/plugins/time.py +++ b/plugins/time.py @@ -9,7 +9,7 @@ api_url = 'http://api.wolframalpha.com/v2/query?format=plaintext' @hook.command("time") def time_command(inp, bot=None): - ".time <area> -- Gets the time in <area>" + "time <area> -- Gets the time in <area>" query = "current time in %s" % inp diff --git a/plugins/todo.py b/plugins/todo.py index 9239823..83537ec 100755 --- a/plugins/todo.py +++ b/plugins/todo.py @@ -90,7 +90,7 @@ def db_search(db, nick, query): @hook.command def todo(inp, nick='', chan='', db=None, notice=None, bot=None): - ".todo (add|del|list|search) args -- Manipulates your list of todos." + "todo (add|del|list|search) args -- Manipulates your list of todos." db_init(db) diff --git a/plugins/tvdb.py b/plugins/tvdb.py index e10bf73..c0cd1e3 100755 --- a/plugins/tvdb.py +++ b/plugins/tvdb.py @@ -85,7 +85,7 @@ def get_episode_info(episode, api_key): @hook.command @hook.command('tv') def tv_next(inp, bot=None): - ".tv <series> -- Get the next episode of <series>." + "tv <series> -- Get the next episode of <series>." api_key = bot.config.get("api_keys", {}).get("tvdb", None) if api_key is None: @@ -135,7 +135,7 @@ def tv_next(inp, bot=None): @hook.command @hook.command('tv_prev') def tv_last(inp, bot=None): - ".tv_last <series> -- Gets the most recently aired episode of <series>." + "tv_last <series> -- Gets the most recently aired episode of <series>." api_key = bot.config.get("api_keys", {}).get("tvdb", None) if api_key is None: diff --git a/plugins/twitter.py b/plugins/twitter.py index 4cb8f7c..2cad245 100755 --- a/plugins/twitter.py +++ b/plugins/twitter.py @@ -47,7 +47,7 @@ def parseDateTime(s): @hook.command def twitter(inp): - ".twitter <user>/<user> <n>/<id>/#<hashtag>/@<user> -- Gets last/<n>th "\ + "twitter <user>/<user> <n>/<id>/#<hashtag>/@<user> -- Gets last/<n>th "\ "tweet from <user>/gets tweet <id>/Gets random tweet with #<hashtag>/"\ "gets replied tweet from @<user>." diff --git a/plugins/urban.py b/plugins/urban.py index 4367d34..45620b3 100755 --- a/plugins/urban.py +++ b/plugins/urban.py @@ -5,7 +5,7 @@ from util import hook, http @hook.command('u') @hook.command def urban(inp): - ".urban <phrase> [id] -- Looks up <phrase> on urbandictionary.com." + "urban <phrase> [id] -- Looks up <phrase> on urbandictionary.com." # set a default definition number id = 1 diff --git a/plugins/urlparse.py b/plugins/urlparse.py index 5fc63dc..99fad68 100755 --- a/plugins/urlparse.py +++ b/plugins/urlparse.py @@ -1,4 +1,4 @@ -from util import hook, http, urlnorm +rom util import hook, http, urlnorm import re titler = re.compile(r'(?si)<title>(.+?)') @@ -32,5 +32,5 @@ def get_title(url): @hook.command def title(inp): - ".title -- gets the title of a web page" + "title -- gets the title of a web page" return get_title(inp) diff --git a/plugins/validate.py b/plugins/validate.py index 145c586..93c6023 100755 --- a/plugins/validate.py +++ b/plugins/validate.py @@ -10,7 +10,7 @@ from util import hook, http @hook.command('w3c') @hook.command def validate(inp): - ".validate -- Runs url through the w3c markup validator." + "validate -- Runs url through the w3c markup validator." if not inp.startswith('http://'): inp = 'http://' + inp diff --git a/plugins/vimeo.py b/plugins/vimeo.py index 99d4037..6edb990 100755 --- a/plugins/vimeo.py +++ b/plugins/vimeo.py @@ -3,7 +3,7 @@ from util import hook, http @hook.regex(r'vimeo.com/([0-9]+)') def vimeo_url(match): - ".vimeo -- returns information on the Vimeo video at " + "vimeo -- returns information on the Vimeo video at " info = http.get_json('http://vimeo.com/api/v2/video/%s.json' % match.group(1)) diff --git a/plugins/violence.py b/plugins/violence.py index efcc6d1..48ad088 100755 --- a/plugins/violence.py +++ b/plugins/violence.py @@ -28,7 +28,7 @@ with open("plugins/data/kill_bodyparts.txt") as f: @hook.command def slap(inp, me=None, nick=None, conn=None, notice=None): - ".slap -- Makes the bot slap ." + "slap -- Makes the bot slap ." target = inp.lower() if not re.match(nick_re, target): @@ -51,7 +51,7 @@ def slap(inp, me=None, nick=None, conn=None, notice=None): @hook.command def lart(inp, me=None, nick=None, conn=None, notice=None): - ".lart -- LARTs ." + "lart -- LARTs ." target = inp.lower() if not re.match(nick_re, target): @@ -71,7 +71,7 @@ def lart(inp, me=None, nick=None, conn=None, notice=None): @hook.command def kill(inp, me=None, nick=None, conn=None, notice=None): - ".kill -- Makes the bot kill ." + "kill -- Makes the bot kill ." target = inp.lower() if not re.match(nick_re, target): diff --git a/plugins/weather.py b/plugins/weather.py index 502f1b8..965f504 100755 --- a/plugins/weather.py +++ b/plugins/weather.py @@ -9,7 +9,7 @@ def fahrenheit_to_celcius(f): @hook.command(autohelp=False) def forecast(inp, nick='', server='', reply=None, db=None, notice=None, say=None): - ".forecast [dontsave] -- Gets a weather forecast" \ + "forecast [dontsave] -- Gets a weather forecast" \ " for from Google." loc = inp @@ -52,7 +52,7 @@ def forecast(inp, nick='', server='', @hook.command(autohelp=False) def weather(inp, nick='', server='', reply=None, db=None, notice=None): - ".weather [dontsave] -- Gets weather data"\ + "weather [dontsave] -- Gets weather data"\ " for from Google." loc = inp diff --git a/plugins/whois.py b/plugins/whois.py index bf0426b..fb5f3c4 100755 --- a/plugins/whois.py +++ b/plugins/whois.py @@ -3,7 +3,7 @@ from util import pywhois, hook @hook.command def whois(inp, say=None): - ".whois -- Look up ownership infomation for " + "whois -- Look up ownership infomation for " try: w = pywhois.whois(inp) except: diff --git a/plugins/wikipedia.py b/plugins/wikipedia.py index ecda91c..9539ea7 100755 --- a/plugins/wikipedia.py +++ b/plugins/wikipedia.py @@ -16,7 +16,7 @@ paren_re = re.compile('\s*\(.*\)$') @hook.command('w') @hook.command def wiki(inp): - ".wiki -- Gets first sentence of Wikipedia article on ." + "wiki -- Gets first sentence of Wikipedia article on ." x = http.get_xml(search_url, search=inp) diff --git a/plugins/wolframalpha.py b/plugins/wolframalpha.py index 00bca69..0f70eae 100755 --- a/plugins/wolframalpha.py +++ b/plugins/wolframalpha.py @@ -11,7 +11,7 @@ from util.text import truncate_words @hook.command('wa') @hook.command def wolframalpha(inp, bot=None): - ".wa -- Computes using Wolfram Alpha." + "wa -- Computes using Wolfram Alpha." api_key = bot.config.get("api_keys", {}).get("wolframalpha", None) bitly_user = bot.config.get("api_keys", {}).get("bitly_user", None) diff --git a/plugins/wordoftheday.py b/plugins/wordoftheday.py index ebf6c1c..7b7a19b 100755 --- a/plugins/wordoftheday.py +++ b/plugins/wordoftheday.py @@ -5,7 +5,7 @@ from BeautifulSoup import BeautifulSoup @hook.command(autohelp=False) def word(inp, say=False, nick=False): - ".word -- Gets the word of the day." + "word -- Gets the word of the day." page = http.get('http://merriam-webster.com/word-of-the-day') soup = BeautifulSoup(page) diff --git a/plugins/youtube.py b/plugins/youtube.py index 0379750..8a1657b 100755 --- a/plugins/youtube.py +++ b/plugins/youtube.py @@ -70,7 +70,7 @@ def youtube_url(match): @hook.command('y') @hook.command def youtube(inp): - ".youtube -- Returns the first YouTube search result for ." + "youtube -- Returns the first YouTube search result for ." j = http.get_json(search_api_url, q=inp)