diff --git a/plugins/fact.py b/plugins/fact.py index 2178792..327074f 100644 --- a/plugins/fact.py +++ b/plugins/fact.py @@ -5,14 +5,27 @@ from BeautifulSoup import BeautifulSoup @hook.command(autohelp=False) def fact(inp, say=False, nick=False): ".fact -- gets a fact from OMGFACTS" + + fact = None + while fact is None: + try: + fact, link = get_fact() + except: + pass + + return "%s [ %s ]" % (fact, link) + + + +def get_fact(): page = http.get('http://www.omg-facts.com/random') - soup = BeautifulSoup(page) - container = soup.find('a', {'class' : 'surprise'}) - link = container['href'] fact = misc.strip_html(container.renderContents()) - return "%s [ %s ]" % (fact, link) + if fact: + return (fact, link) + else: + raise nofact diff --git a/plugins/factoids.py b/plugins/factoids.py index 187eb99..740f810 100644 --- a/plugins/factoids.py +++ b/plugins/factoids.py @@ -66,24 +66,23 @@ def remember(inp, nick='', db=None, say=None, input=None, notice=None): return @hook.command("f") -def forget(inp, db=None): +def forget(inp, db=None, input=None, notice=None): ".f -- forgets the mapping that word had" - - try: - head, tail = inp.split(None, 1) - except ValueError: - return remember.__doc__ + if input.nick not in input.bot.config["admins"]: + return db_init(db) - data = get_memory(db, binp) + data = get_memory(db, inp) if data: db.execute("delete from mem where word=lower(?)", - (inp)) + [inp]) db.commit() - return 'forgot `%s`' % data.replace('`', "'") + notice('`%s` has been forgotten.' % data.replace('`', "'")) + return else: - return "I don't know about that." + notice("I don't know about that.") + return @hook.command("info") @hook.regex(r'^\? ?(.+)') diff --git a/plugins/gcalc.py b/plugins/gcalc.py index b939f34..3273fa7 100644 --- a/plugins/gcalc.py +++ b/plugins/gcalc.py @@ -29,4 +29,3 @@ def calc(inp): output = misc.strip_html(output) return output - diff --git a/plugins/get.py b/plugins/get.py new file mode 100644 index 0000000..0c5ca7d --- /dev/null +++ b/plugins/get.py @@ -0,0 +1,77 @@ +#-*- coding: utf-8 -*- + +# Copyright (C) 2011 by Guilherme Pinto Gonçalves, Ivan Sichmman Freitas + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +from util import hook +import sys +import subprocess +from functools import partial + +fortunes = { + 'fortunes': 'fortunes', + 'fortune': 'fortunes', + 'quotes': 'literature', + 'quote': 'literature', + 'riddle': 'riddles', + 'riddles': 'riddles', + 'cookie': 'cookie', + 'cookies': 'cookie', + 'disclaimer': 'disclaimer', + 'f': 'fortunes', + 'q': 'literature', + 'r': 'riddles' + } + +# Use this later to replace the fortunes list workaaround +def get_installed_fortunes(): + try: + proc = subprocess.Popen(("/usr/bin/fortune", "-f"), + stderr = subprocess.PIPE) + except OSError: + return set() + + return set(proc.stderr) + +# Use this later to replace the fortunes list workaaround +def get_fortune(inp): + try: + proc = subprocess.Popen(("fortune", "-a", inp), + stderr = subprocess.PIPE, + stdout = subprocess.PIPE) + except OSError: + return set() + + return set(proc.stderr) + +@hook.command() +def get(inp, say=None): + ".get -- uses fortune-mod to get something. can be riddle, quote or fortune" + fortune = get_fortune(fortune[inp]) + + while fortune.length() =< 5: + fortune = get_fortune(fortune[inp]) + + if proc.wait() == 0: + + for line in proc.stdout: + say(line.lstrip()) + else: + return "Fortune failed: " + proc.stderr.read() diff --git a/plugins/hash.py b/plugins/hash.py index a1913dd..33fec07 100644 --- a/plugins/hash.py +++ b/plugins/hash.py @@ -10,12 +10,12 @@ def md5(inp): def sha1(inp): ".hash -- returns a sha1 hash of " return hashlib.sha1(inp).hexdigest() - + @hook.command def sha256(inp): ".hash -- returns a sha256 hash of " return hashlib.sha256(inp).hexdigest() - + @hook.command def sha512(inp): ".hash -- returns a sha512 hash of " diff --git a/plugins/karma.py b/plugins/karma.py new file mode 100644 index 0000000..af7a45d --- /dev/null +++ b/plugins/karma.py @@ -0,0 +1,117 @@ +# Karma plugin for Skybot +# Written by GhettoWizard(2011) + +import time +import re + +from util import hook, timesince + + +def up(db, nick_vote): + db.execute("""UPDATE karma SET + up_karma = up_karma+1, + total_karma = total_karma+1 WHERE nick_vote=?""", (nick_vote.lower(),)) + db.commit() + + +def down(db, nick_vote): + db.execute("""UPDATE karma SET + down_karma = down_karma+1, + total_karma = total_karma+1 WHERE nick_vote=?""", (nick_vote.lower(),)) + db.commit() + + +def allowed(db, nick, nick_vote): + time_restriction = 3600 + db.execute("""DELETE FROM karma_voters WHERE ? - epoch >= 3600""", + (time.time(),)) + db.commit() + check = db.execute("""SELECT epoch FROM karma_voters WHERE voter=? AND votee=?""", + (nick.lower(), nick_vote.lower())).fetchone() + + if check: + check = check[0] + if time.time() - check >= time_restriction: + db.execute("""INSERT OR REPLACE INTO karma_voters( + voter, + votee, + epoch) values(?,?,?)""", (nick.lower(), nick_vote.lower(), time.time())) + db.commit() + return True#, 0 + else: + return False#, timesince.timeuntil(check, now=time.time()-time_restriction) + else: + db.execute("""INSERT OR REPLACE INTO karma_voters( + voter, + votee, + epoch) values(?,?,?)""", (nick.lower(), nick_vote.lower(), time.time())) + db.commit() + return True#, 0 + + +# TODO Make this work on multiple matches in a string, right now it'll only +# work on one match. Scaevolus might have to change the hook function to work +# with findall, as search seems limited. +# karma_re = ('((\S+)(\+\+|\-\-))+', re.I) +karma_re = ('(.+)(\+\+|\-\-)$', re.I) + +@hook.regex(*karma_re) +def karma_add(match, nick='', chan='', db=None): + nick_vote = match.group(1).strip() + if nick.lower() == nick_vote.lower(): + return + vote_allowed = allowed(db, nick, nick_vote) + if vote_allowed: + if match.group(2) == '++': + db.execute("""INSERT or IGNORE INTO karma( + nick_vote, + up_karma, + down_karma, + total_karma) values(?,?,?,?)""", (nick_vote.lower(),0,0,0)) + up(db, nick_vote) + if match.group(2) == '--': + db.execute("""INSERT or IGNORE INTO karma( + nick_vote, + up_karma, + down_karma, + total_karma) values(?,?,?,?)""", (nick_vote.lower(),0,0,0)) + down(db, nick_vote) + else: + return + else: + return + + return + + +@hook.command('k') +@hook.command +def karma(inp, nick='', chan='', db=None): + """.k/.karma -- returns karma stats for """ + + db.execute("""CREATE TABLE if not exists karma( + nick_vote TEXT PRIMARY KEY, + up_karma INTEGER, + down_karma INTEGER, + total_karma INTEGER)""") + + db.execute("""CREATE TABLE if not exists karma_voters( + voter TEXT, + votee TEXT, + epoch FLOAT, + PRIMARY KEY(voter, votee))""") + + if not chan.startswith('#'): + return + + nick_vote = inp + out = db.execute("""SELECT * FROM karma WHERE nick_vote=?""", + (nick_vote.lower(),)).fetchall() + + if not out: + return "no karma" + else: + out = out[0] + return "'%s' has %s karma" % (nick_vote, out[1]-out[2]) + + return \ No newline at end of file diff --git a/plugins/kill.py b/plugins/kill.py new file mode 100644 index 0000000..de94b9f --- /dev/null +++ b/plugins/kill.py @@ -0,0 +1,36 @@ +from util import hook +import re +import random + +kills = ["rips off 's and leaves them to die.", + "grabs 's head and rips it clean off their body.", + "grabs a machine gun and riddles 's body with bullets.", + "gags and ties then throws them off a bridge.", + "crushes with a huge spiked boulder.", + "rams a rocket launcher up 's ass and lets off a few rounds.", + "crushes 's skull in with a spiked mace."] + +body = ['head', + 'arms', + 'leg', + 'arm', + '"special parts"'] + +@hook.command +def kill(inp, me = None, nick = None, input=None, notice=None): + ".kill - kill a user" + inp = inp.strip() + + if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()): + notice("Invalid username!") + return + + if inp == input.conn.nick.lower() or inp == "itself": + msg = 'kills ' + nick + ' and rakes their corpse (:3)' + else: + kill = random.choice(kills) + kill = re.sub ('', inp, kill) + msg = re.sub ('', random.choice(body), kill) + + me(msg) + diff --git a/plugins/lastfm.py b/plugins/lastfm.py index 89f590d..d3bc7ad 100644 --- a/plugins/lastfm.py +++ b/plugins/lastfm.py @@ -1,7 +1,7 @@ from util import hook, http -api_key = "" +api_key = "71ebca1c7e6b12ccd900efed95f7c1e0" api_url = "http://ws.audioscrobbler.com/2.0/?format=json" diff --git a/plugins/location.py b/plugins/location.py new file mode 100644 index 0000000..83f6af7 --- /dev/null +++ b/plugins/location.py @@ -0,0 +1,38 @@ +from util import hook + +def find_location(ip, api): + import string + import urllib + response = urllib.urlopen("http://api.ipinfodb.com/v3/ip-city/?key="+api+"&ip="+ip).read() + response = response.split(";") + give = {} + give["country"] = response[4].title() + give["country_short"] = response[3].upper() + give["state"] = response[5].title() + give["city"] = response[6].title() + give["timezone"] = response[10].title() + return give + +def timezone(ip): + time = find_location(ip)["timezone"] + time = time.replace(":",".") + time = time.replace(".00","") + return int(time) + +@hook.command +def locations(inp, say = None, me = None, bot = None): + ".location - Performs a GeoIP check on the ip given." + api = bot.config['api_keys']['geoip'] + if api == "": + return "No API key" + give = find_location(inp, api) + if give["country"] not in [""," ","-"," - "]: + if give["state"] == give["city"]: + localstring = give["city"] + else: + localstring = give["city"] + ", " + give["state"] + say("That IP comes from " + give["country"] + " (" + give["country_short"] + ")") + say("I think it's in " + localstring + " with a timezone of " + give["timezone"] + "GMT") + else: + say("Either that wasn't an IP or I cannot locate it in my database. :(") + return diff --git a/plugins/mcping.py b/plugins/mcping.py index 80eba26..d7eb74d 100644 --- a/plugins/mcping.py +++ b/plugins/mcping.py @@ -18,7 +18,7 @@ def get_info(host, port): sock.close() return "%s - %d/%d players" % (values[0], int(values[1]), int(values[2])) except: - return "Error pinging "+host+":"+str(port)+", is it up? double-check your address!" + return "Error pinging "+host+":"+str(port)+", is it up? double-check your address!" @hook.command def mcping(inp): diff --git a/plugins/mctools.py b/plugins/mctools.py index f45a9ab..c3dd9d5 100644 --- a/plugins/mctools.py +++ b/plugins/mctools.py @@ -3,12 +3,10 @@ import string @hook.command(autohelp=False) def mcstatus(inp, bot=None): - ".mcstatus -- Attempts to log in to minecraft" + ".mcstatus - Attempts to log in to minecraft" username = bot.config["api_keys"]["mc_user"] password = bot.config["api_keys"]["mc_pass"] login = http.get("https://login.minecraft.net/?user="+username+"&password="+password+"&version=13") - print "Username: " + username - print "Response: " + login if username.lower() in login.lower(): return "Minecraft login servers appear to be online!" else: @@ -16,7 +14,7 @@ def mcstatus(inp, bot=None): @hook.command def mclogin(inp, say=None): - ".mclogin -- Attempts to log in to minecraft using the provided username and password, this is NOT logged." + ".mclogin - Attempts to log in to minecraft using the provided username and password, this is NOT logged." inp = inp.split(" ") username = inp[0] password = inp[1] @@ -29,7 +27,7 @@ def mclogin(inp, say=None): @hook.command def haspaid(inp): - ".haspaid -- Checks if a user has a premium Minecraft account" + ".haspaid - Checks if a user has a premium Minecraft account" login = http.get("http://www.minecraft.net/haspaid.jsp?user=" + inp) if "true" in login: return "The account \'" + inp + "\' is a premium Minecraft account! :D" diff --git a/plugins/misc.py b/plugins/misc.py index 3226434..7706bf2 100644 --- a/plugins/misc.py +++ b/plugins/misc.py @@ -3,7 +3,7 @@ import socket import subprocess import time -from util import hook +from util import hook, http socket.setdefaulttimeout(10) # global setting @@ -45,6 +45,11 @@ def onjoin(paraml, conn=None, bot=None): conn.join(channel) time.sleep(1) # don't flood JOINs + # set user-agent + + http.ua_skybot = 'CloudBot' + + @hook.regex(r'^\x01VERSION\x01$') def version(inp, notice=None): notice('\x01VERSION CloudBot/DEV - https://github.com/lukeroge/CloudBot') diff --git a/plugins/namegen.py b/plugins/namegen.py index ec3d955..363e268 100644 --- a/plugins/namegen.py +++ b/plugins/namegen.py @@ -1,25 +1,23 @@ from util import hook,molecular -import string +import unicodedata @hook.command() def namegen(inp, say = None, nick = None, input=None, notice=None): ".namegen [modules] -- generates some names using the chosen modules. \".namegen list\" will display a list of all modules" gen = molecular.Molecule() - all_modules = ["dever_f", "dwarves", "elves_m", "fantasy", "harn_cln", "harn_gar", "harn_m2", "harn_s_m", "human_m", "narn", "dever_m", "elves_d", "elves_n", "felana", "harn_f2", "harn_k_f", "harn_m", "hobbits", "inns", " orcs_t", "dragon", "elves_f", "elves_t", "general", "harn_f", "harn_k_m", "harn_s_f", "human_f", "items", "orcs_wh"] + all_modules = ["dever_f", "dwarves", "elves_m", "fantasy", "harn_cln", "harn_gar", "harn_m2", " harn_s_m", "human_m", "narn", "dever_m", "elves_d", "elves_n", "felana", " harn_f2", "harn_k_f", "harn_m", "hobbits", "inns", " orcs_t", "dragon", "elves_f", "elves_t", "general", "harn_f", "harn_k_m", "harn_s_f", "human_f", "items", "orcs_wh", "wc_tribes", "wc_cats"] modules = [] - - inp.lower() if inp == "list": - notice("Available modules: dever_f, dwarves, elves_m, fantasy, harn_cln, harn_gar, harn_m2, harn_s_m, human_m, narn, dever_m, elves_d, elves_n, felana, harn_f2, harn_k_f, harn_m, hobbits, inns, orcs_t, dragon, elves_f, elves_t, general, harn_f, harn_k_m, harn_s_f, human_f, items, orcs_wh") + notice("Available modules: dever_f, dwarves, elves_m, fantasy, harn_cln, harn_gar, harn_m2, harn_s_m, human_m, narn, dever_m, elves_d, elves_n, felana, harn_f2, harn_k_f, harn_m, hobbits, inns, orcs_t, dragon, elves_f, elves_t, general, harn_f, harn_k_m, harn_s_f, human_f, items, orcs_wh, wc_tribes, wc_cats") return - - if inp == "all": - modules = all_modules - else: + + if inp: modules = inp.split(' ') + else: + modules = ["human_m", "human_f"] for module in modules: if module in all_modules: diff --git a/plugins/quote.py b/plugins/quote.py index 37c69d7..149bd87 100644 --- a/plugins/quote.py +++ b/plugins/quote.py @@ -4,47 +4,110 @@ import time from util import hook +def format_quote(q, num, n_quotes): + """Returns a formatted string of a quote""" + ctime, nick, msg = q + return "[%d/%d] <%s> %s" % (num, n_quotes, + nick, msg) + +def create_table_if_not_exists(db): + """Creates an empty quote table if one does not already exist""" + db.execute('''CREATE TABLE IF NOT EXISTS quote ( + chan, + nick, + add_nick, + msg, + time real, + deleted default 0, + PRIMARY KEY (chan, nick, msg) + )''') + db.commit() def add_quote(db, chan, nick, add_nick, msg): - db.execute('''insert or fail into quote (chan, nick, add_nick, - msg, time) values(?,?,?,?,?)''', - (chan, nick, add_nick, msg, time.time())) - db.commit() - + """Adds a quote to a nick, returns message string""" + try: + db.execute('''INSERT OR FAIL INTO quote + (chan, nick, add_nick, msg, time) + VALUES(?,?,?,?,?)''', + (chan, nick, add_nick, msg, time.time())) + db.commit() + except db.IntegrityError: + return "message already stored, doing nothing." + return "quote added." def del_quote(db, chan, nick, add_nick, msg): - db.execute('''update quote set deleted = 1 where - chan=? and lower(nick)=lower(?) and msg=msg''') + """Deletes a quote from a nick""" + db.execute('''UPDATE quote + SET deleted = 1 + WHERE chan=? + AND lower(nick)=lower(?) + AND msg=msg''') db.commit() +def get_quote_num(num, count, name): + """Returns the quote number desired from the database""" + if num: # Make sure num is a number if it isn't false + num = int(num) + if count == 0: # If there are no quotes in the database, raise an Exception. + raise Exception("No quotes found for %s" % name) + if num and num < 0: # If the selected quote is less than 0, count back if possible. + num = count + num + 1 if num + count > -1 else count + 1 + if num and num > count: # If a number is given and and there are not enough quotes, raise an Exception. + raise Exception("I only have %d quote%s for %s" % (count, ('s', '')[count == 1], name)) + if num and num == 0: # If the number is zero, set it to one + num = 1 + if not num: # If a number is not given, select a random one + num = random.randint(1, count) + return num -def get_quotes_by_nick(db, chan, nick): - return db.execute("select time, nick, msg from quote where deleted!=1 " - "and chan=? and lower(nick)=lower(?) order by time", - (chan, nick)).fetchall() +def get_quote_by_nick(db, chan, nick, num=False): + """Returns a formatted quote from a nick, random or selected by number""" + count = db.execute('''SELECT COUNT(*) + FROM quote + WHERE deleted != 1 + AND chan = ? + AND lower(nick) = lower(?)''', (chan, nick)).fetchall()[0][0] + try: + num = get_quote_num(num, count, nick) + except Exception as error_message: + return error_message -def get_quotes_by_chan(db, chan): - return db.execute("select time, nick, msg from quote where deleted!=1 " - "and chan=? order by time", (chan,)).fetchall() + quote = db.execute('''SELECT time, nick, msg + FROM quote + WHERE deleted != 1 + AND chan = ? + AND lower(nick) = lower(?) + ORDER BY time + LIMIT ?, 1''', (chan, nick, (num-1))).fetchall()[0] + return format_quote(quote, num, count) +def get_quote_by_chan(db, chan, num=False): + """Returns a formatted quote from a channel, random or selected by number""" + count = db.execute('''SELECT COUNT(*) + FROM quote + WHERE deleted != 1 + AND chan = ?''', (chan,)).fetchall()[0][0] -def format_quote(q, num, n_quotes): - ctime, nick, msg = q - return "[%d/%d] %s <%s> %s" % (num, n_quotes, - time.strftime("%Y-%m-%d", time.gmtime(ctime)), nick, msg) + try: + num = get_quote_num(num, count, chan) + except Exception as error_message: + return error_message + quote = db.execute('''SELECT time, nick, msg + FROM quote + WHERE deleted != 1 + AND chan = ? + ORDER BY time + LIMIT ?, 1''', (chan, (num -1))).fetchall()[0] + return format_quote(quote, num, count) @hook.command('q') @hook.command def quote(inp, nick='', chan='', db=None): ".q/.quote [#chan] [nick] [#n]/.quote add -- gets " \ "random or [#n]th quote by or from <#chan>/adds quote" - - db.execute("create table if not exists quote" - "(chan, nick, add_nick, msg, time real, deleted default 0, " - "primary key (chan, nick, msg))") - db.commit() + create_table_if_not_exists(db) add = re.match(r"add[^\w@]+(\S+?)>?\s+(.*)", inp, re.I) retrieve = re.match(r"(\S+)(?:\s+#?(-?\d+))?$", inp) @@ -52,47 +115,16 @@ def quote(inp, nick='', chan='', db=None): if add: quoted_nick, msg = add.groups() - try: - add_quote(db, chan, quoted_nick, nick, msg) - db.commit() - except db.IntegrityError: - return "message already stored, doing nothing." - return "quote added." + return add_quote(db, chan, quoted_nick, nick, msg) elif retrieve: select, num = retrieve.groups() - - by_chan = False - if select.startswith('#'): - by_chan = True - quotes = get_quotes_by_chan(db, select) + by_chan = True if select.startswith('#') else False + if by_chan: + return get_quote_by_chan(db, select, num) else: - quotes = get_quotes_by_nick(db, chan, select) + return get_quote_by_nick(db, chan, select, num) elif retrieve_chan: chan, nick, num = retrieve_chan.groups() - - quotes = get_quotes_by_nick(db, chan, nick) - else: - return quote.__doc__ - - n_quotes = len(quotes) - - if not n_quotes: - return "no quotes found" - - if num: - num = int(num) - - if num: - if num > n_quotes or (num < 0 and num < -n_quotes): - return "I only have %d quote%s for %s" % (n_quotes, - ('s', '')[n_quotes == 1], select) - elif num < 0: - selected_quote = quotes[num] - num = n_quotes + num + 1 - else: - selected_quote = quotes[num - 1] - else: - num = random.randint(1, n_quotes) - selected_quote = quotes[num - 1] - - return format_quote(selected_quote, num, n_quotes) + return get_quote_by_nick(db, chan, nick, num) + + return quote.__doc__ diff --git a/plugins/slogan.py b/plugins/slogan.py index 48c4a6b..17f822a 100644 --- a/plugins/slogan.py +++ b/plugins/slogan.py @@ -17,6 +17,5 @@ def sloganizr(inp, nick=None, say=None, input=None): slogan = slogan.split() slogan[0] = slogan[0].capitalize() slogan = " ".join(slogan) - - return slogan + return slogan diff --git a/plugins/spellcheck.py b/plugins/spellcheck.py new file mode 100644 index 0000000..80b0661 --- /dev/null +++ b/plugins/spellcheck.py @@ -0,0 +1,23 @@ +import re + +from util import hook +import enchant + + +@hook.command("spellcheck") +def spell(inp): + '''.time -- gets the time in ''' + d = enchant.Dict("en_US") + + if not (inp.split()[-1] == inp): + return "This command only supports one word at a time." + + is_correct = d.check(inp) + suggestions = d.suggest(inp) + s_string = ', '.join(suggestions) + + if is_correct: + return "That word appears to be valid! (suggestions: " + s_string + ")" + else: + return "That word appears to be invalid! (suggestions: " + s_string + ")" + diff --git a/plugins/tell.py b/plugins/tell.py index 72201c5..073348d 100644 --- a/plugins/tell.py +++ b/plugins/tell.py @@ -31,6 +31,7 @@ def tellinput(paraml, input=None, db=None, bot=None): db_init(db) + tells = get_tells(db, input.nick) if tells: @@ -73,11 +74,11 @@ def showtells(inp, nick='', chan='', notice=None, db=None): @hook.command def tell(inp, nick='', chan='', db=None, input=None, notice=None): ".tell -- relay to when is around" - query = inp.split(' ', 1) if len(query) != 2: - return tell.__doc__ + notice(tell.__doc__) + return user_to = query[0].lower() message = query[1].strip() @@ -87,7 +88,7 @@ def tell(inp, nick='', chan='', db=None, input=None, notice=None): chan = 'a pm' if user_to == user_from.lower(): - notice("No.") + notice("No. I'm not doing that. -.-") return if user_to.lower() == "mau5bot": diff --git a/plugins/translate.py b/plugins/translate.py index 56d3c88..20fe4e1 100644 --- a/plugins/translate.py +++ b/plugins/translate.py @@ -61,6 +61,7 @@ def translate(inp): '.translate [source language [target language]] -- translates' \ ' from source language (default autodetect) to target' \ ' language (default English) using Google Translate' + return "Due to Google deprecating the translation API, this command is no longer available :(" args = inp.split(' ', 2) @@ -96,6 +97,7 @@ def babel_gen(inp): @hook.command def babel(inp): ".babel -- translates through multiple languages" + return "Due to Google deprecating the translation API, this command is no longer available :(" try: return list(babel_gen(inp))[-1][2] @@ -107,6 +109,8 @@ def babel(inp): def babelext(inp): ".babelext -- like .babel, but with more detailed output" + return "Due to Google deprecating the translation API, this command is no longer available :(" + try: babels = list(babel_gen(inp)) except IOError, e: diff --git a/plugins/tvdb.py b/plugins/tvdb.py index 65f9044..75c1212 100644 --- a/plugins/tvdb.py +++ b/plugins/tvdb.py @@ -1,6 +1,6 @@ """ TV information, written by Lurchington 2010 -modified by rmmh 2010 && lukeroge 2011 +modified by rmmh 2010 """ import datetime @@ -13,6 +13,7 @@ from util import hook, http base_url = "http://thetvdb.com/api/" +api_key = "469B73127CA0C411" def get_zipped_xml(*args, **kwargs): @@ -24,19 +25,19 @@ def get_zipped_xml(*args, **kwargs): return etree.parse(ZipFile(zip_buffer, "r").open(path)) -def get_episodes_for_series(seriesname, api_key): +def get_episodes_for_series(seriesname): res = {"error": None, "ended": False, "episodes": None, "name": None} # http://thetvdb.com/wiki/index.php/API:GetSeries try: query = http.get_xml(base_url + 'GetSeries.php', seriesname=seriesname) except URLError: - res["error"] = "Error contacting thetvdb.com." + res["error"] = "error contacting thetvdb.com" return res series_id = query.xpath('//seriesid/text()') if not series_id: - res["error"] = "Unknown TV series (using www.thetvdb.com)." + res["error"] = "unknown tv series (using www.thetvdb.com)" return res series_id = series_id[0] @@ -45,7 +46,7 @@ def get_episodes_for_series(seriesname, api_key): series = get_zipped_xml(base_url + '%s/series/%s/all/en.zip' % (api_key, series_id), path="en.xml") except URLError: - res["error"] = "Error contacting thetvdb.com." + res["error"] = "error contacting thetvdb.com" return res series_name = series.xpath('//SeriesName/text()')[0] @@ -83,11 +84,9 @@ def get_episode_info(episode): @hook.command @hook.command('tv') -def tv_next(inp, bot = None): +def tv_next(inp): ".tv_next -- get the next episode of " - - api_key = bot.config["api_keys"]["tvdb"] - episodes = get_episodes_for_series(inp, api_key) + episodes = get_episodes_for_series(inp) if episodes["error"]: return episodes["error"] @@ -120,22 +119,20 @@ def tv_next(inp, bot = None): break if not next_eps: - return "There are no new episodes scheduled for %s." % series_name + return "there are no new episodes scheduled for %s" % series_name if len(next_eps) == 1: - return "The next episode of %s airs %s." % (series_name, next_eps[0]) + return "the next episode of %s airs %s" % (series_name, next_eps[0]) else: next_eps = ', '.join(next_eps) - return "The next episodes of %s: %s." % (series_name, next_eps) + return "the next episodes of %s: %s" % (series_name, next_eps) @hook.command @hook.command('tv_prev') -def tv_last(inp, bot = None): +def tv_last(inp): ".tv_last -- gets the most recently aired episode of " - - api_key = bot.config["api_keys"]["tvdb"] - episodes = get_episodes_for_series(inp, api_key) + episodes = get_episodes_for_series(inp) if episodes["error"]: return episodes["error"] diff --git a/plugins/urlhistory.py b/plugins/urlhistory.py index e3b90a4..c5e344e 100644 --- a/plugins/urlhistory.py +++ b/plugins/urlhistory.py @@ -61,10 +61,10 @@ def format_reply(history): return #"that url has been posted %s in the past %s by %s (%s)." % (ordinal, -@hook.regex(r'([a-zA-Z]+://|www\.)[^ ]+') -def urlinput(match, nick='', chan='', db=None, bot=None): +@hook.command +def url(inp, nick='', chan='', db=None, bot=None): db_init(db) - url = urlnorm.normalize(match.group().encode('utf-8')) + url = urlnorm.normalize(inp.group().encode('utf-8')) if url not in ignored_urls: url = url.decode('utf-8') history = get_history(db, chan, url) diff --git a/plugins/urltools.py b/plugins/urltools.py index a0d0724..e2858c7 100644 --- a/plugins/urltools.py +++ b/plugins/urltools.py @@ -4,7 +4,7 @@ from urllib2 import urlopen, Request, HTTPError import re import BeautifulSoup -ignored_urls = ["http://google.com","http://youtube.com","http://pastebin.com","http://mibpaste.com","http://fpaste.com"] +ignored_urls = ["http://google.com","http://youtube.com","http://pastebin.com","http://mibpaste.com","http://fpaste.com","beastnode.com"] wordDic = { '"': '"', @@ -41,7 +41,7 @@ def multiwordReplace(text, wordDic): #@hook.regex(r'^(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?#Username:Password)(?:\w+:\w+@)?(?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?$') -@hook.regex(r'([a-zA-Z]+://|www\.)[^ ]+') +#@hook.regex(r'([a-zA-Z]+://|www\.)[^ ]+') def urlparser(match, say = None): print "[debug] URL found" url = urlnorm.normalize(match.group().encode('utf-8')) diff --git a/plugins/util/molecular.py b/plugins/util/molecular.py old mode 100755 new mode 100644 index d871d17..4c4e111 --- a/plugins/util/molecular.py +++ b/plugins/util/molecular.py @@ -74,7 +74,7 @@ __version__ = "1.0" import string, re, sys, random -NAMEDIR = "./namefiles/" +NAMEDIR = "/home/ircbot/bot/plugins/util/names" NAMESECTIONS = [ "inf", "first", "mid", "final", "notes", "end" ] class NameFile: @@ -217,4 +217,3 @@ if __name__ == "__main__": for i in range(n): print name.name() i += 1 - diff --git a/plugins/util/namefiles/.directory b/plugins/util/namefiles/.directory new file mode 100644 index 0000000..cee591c --- /dev/null +++ b/plugins/util/namefiles/.directory @@ -0,0 +1,30 @@ +felana.nam Felana (feline) names by Nathalie Hebert +dever_f.nam Deverry female names, namefile by Johan Danforth. +dever_m.nam Deverry male names, namefile by Johan Danforth +dragon.nam Dragon names, namefile by Brett Slocum +dwarves.nam Dwarven names, namefile by Johan Danforth +elves_d.nam Deverry elven names, namefile by Johan Danforth +elves_f.nam Elven female names, namefile by Johan Danforth +elves_m.nam Elven male names, namefile by Johan Danforth +elves_n.nam Nevermore elven surnames, namefile by Chris Gonnerman +elves_t.nam Tolkien elven names, namefile by Johan Danforth +fantasy.nam General fantasy names, namefile by Brett Slocum +general.nam Common fantasy names, namefile by Johan Danforth +harn_cln.nam Hârnic clan (last) names +harn_f.nam Hârnic female names +harn_f2.nam Hârnic female names (simplified) +harn_gar.nam Gargun names +harn_k_f.nam Khuzdul female names +harn_k_m.nam Khuzdul male names +harn_m.nam Hârnic male names +harn_m2.nam Hârnic male names (simplified) +harn_s_f.nam Sindarin female names +harn_s_m.nam Sindarin male names +hobbits.nam Tolkien hobbit names, namefile by Johan Danforth +human_f.nam Female names (fantasy), namefile by Johan Danforth +human_m.nam Male names (fantasy), namefile by Johan Danforth +inns.nam Inn/Tavern/Bar/Pub Names +items.nam Item names +orcs_t.nam Tolkien orc names by Johan Danforth and Tobias Petersson +orcs_wh.nam Warhammer orc names, namefile by Johan Danforth and Tobias Petersson +narn.nam Babylon 5 Narn names by Kevin G. Nunn diff --git a/plugins/util/names/.directory b/plugins/util/names/.directory new file mode 100644 index 0000000..cee591c --- /dev/null +++ b/plugins/util/names/.directory @@ -0,0 +1,30 @@ +felana.nam Felana (feline) names by Nathalie Hebert +dever_f.nam Deverry female names, namefile by Johan Danforth. +dever_m.nam Deverry male names, namefile by Johan Danforth +dragon.nam Dragon names, namefile by Brett Slocum +dwarves.nam Dwarven names, namefile by Johan Danforth +elves_d.nam Deverry elven names, namefile by Johan Danforth +elves_f.nam Elven female names, namefile by Johan Danforth +elves_m.nam Elven male names, namefile by Johan Danforth +elves_n.nam Nevermore elven surnames, namefile by Chris Gonnerman +elves_t.nam Tolkien elven names, namefile by Johan Danforth +fantasy.nam General fantasy names, namefile by Brett Slocum +general.nam Common fantasy names, namefile by Johan Danforth +harn_cln.nam Hârnic clan (last) names +harn_f.nam Hârnic female names +harn_f2.nam Hârnic female names (simplified) +harn_gar.nam Gargun names +harn_k_f.nam Khuzdul female names +harn_k_m.nam Khuzdul male names +harn_m.nam Hârnic male names +harn_m2.nam Hârnic male names (simplified) +harn_s_f.nam Sindarin female names +harn_s_m.nam Sindarin male names +hobbits.nam Tolkien hobbit names, namefile by Johan Danforth +human_f.nam Female names (fantasy), namefile by Johan Danforth +human_m.nam Male names (fantasy), namefile by Johan Danforth +inns.nam Inn/Tavern/Bar/Pub Names +items.nam Item names +orcs_t.nam Tolkien orc names by Johan Danforth and Tobias Petersson +orcs_wh.nam Warhammer orc names, namefile by Johan Danforth and Tobias Petersson +narn.nam Babylon 5 Narn names by Kevin G. Nunn diff --git a/plugins/util/names/dever_f.nam b/plugins/util/names/dever_f.nam new file mode 100644 index 0000000..d6026f7 --- /dev/null +++ b/plugins/util/names/dever_f.nam @@ -0,0 +1,48 @@ +[inf] +Deverry female names, namefile by Johan Danforth. +Edited by Arkhan. +[first] +Al +Br +C +Cl +D +El +Gw +J +L +M +N +Mer +S +R +Ys +[mid] +a +ae +e +ea +i +o +u +y +w +[final] +brylla +cla +dda +ll +lla +llyra +lonna +lyan +na +ngwen +niver +noic +ra +rka +ryan +ssa +vyan +[end] diff --git a/plugins/util/names/dever_m.nam b/plugins/util/names/dever_m.nam new file mode 100644 index 0000000..b73cbad --- /dev/null +++ b/plugins/util/names/dever_m.nam @@ -0,0 +1,54 @@ +[inf] +Deverry male names, namefile by Johan Danforth +Edited by Arkhan +[first] +Aeth +Addr +Bl +C +Car +D +G +Gl +Gw +L +M +Ow +R +Rh +S +T +V +Yr +[mid] +a +ae +e +eo +i +o +u +y +[final] +bryn +c +cyn +dd +ddry +ddyn +doc +dry +gwyn +llyn +myr +n +nnyn +nry +nvan +nyc +r +rcyn +rraent +ran +ryn +[end] diff --git a/plugins/util/names/dragon.nam b/plugins/util/names/dragon.nam new file mode 100644 index 0000000..8efeabd --- /dev/null +++ b/plugins/util/names/dragon.nam @@ -0,0 +1,161 @@ +[inf] +Dragon names, namefile by Brett Slocum +[first] +Aelf +Aelb +Aethel +Aedil +Badu +Beado +Beo +Blith +Bregu +Ceol +Ceon +Coin +Cene +Cuth +Cud +Cwic +Cuic +Quic +Dryct +Dryht +Ead +Ed +Aead +Eald +Ald +Ealh +Alh +Earcon +Ercon +Earn +Ecg +Ec +Eofor +Eorcon +Eormen +Yrmen +Folc +Ford +Fri +Gold +Grim +Haem +Haeth +Heah +Healf +Hreth +Hroth +Huaet +Hyg +Hugu +Iaru +Leof +Maegen +Oidil +Ongen +Os +Rath +Saex +Sax +Sex +Sele +Tat +Theod +Til +Torct +Trum +Tun +Waeg +Wig +Wil +[mid] + +[final] +bald +beald +balt +balth +beorht +berct +berict +beorn +bern +brand +broad +burg +burh +cyni +cyn +degn +ferth +flaed +fled +for +frith +frit +frid +gar +geld +gifu +geofu +gisl +gund +gunn +gyth +gyd +haed +hathu +heard +hard +here +heri +helm +hild +hun +lac +laf +lid +lind +linda +maer +man +mon +mund +noth +raed +red +refu +ric +sig +sige +stan +swith +swid +theof +theow +thryth +thryd +wealch +walh +weald +wald +weard +ward +wic +wict +wiht +wine +wini +wiw +wiv +wuda +wida +wudu +wulf +ulf +wyn +wynn +[end] diff --git a/plugins/util/names/dwarves.nam b/plugins/util/names/dwarves.nam new file mode 100644 index 0000000..b656bca --- /dev/null +++ b/plugins/util/names/dwarves.nam @@ -0,0 +1,43 @@ +[inf] +Dwarven names, namefile by Johan Danforth +Edited by Arkhan +[first] +B +D +F +G +Gl +H +K +L +M +N +R +S +T +V +[mid] +a +e +i +o +oi +u +[final] +bur +fur +gan +gnus +gnar +li +lin +lir +mli +nar +nus +rin +ran +sin +sil +sur +[end] diff --git a/plugins/util/names/elves_d.nam b/plugins/util/names/elves_d.nam new file mode 100644 index 0000000..0ab4066 --- /dev/null +++ b/plugins/util/names/elves_d.nam @@ -0,0 +1,93 @@ +[inf] +Deverry elven names, namefile by Johan Danforth +Edited by Arkhan +[first] +Ad +Adr +Al +Alb +Alod +Ann +B +Ban +Ber +Cal +Car +Carr +Cont +Dall +Dar +Dev +Eb +El +Elb +En +Far +Gann +Gav +Hal +Jav +Jenn +L +Land +Man +Mer +Nan +Ran +Tal +Tal +Val +Wyl +[mid] +a +a +abe +abri +ae +ae +ala +alae +ale +ama +amae +ana +e +e +ede +ena +ere +o +oba +obre +[final] +beriel +clya +danten +dar +ddlaen +gyn +ladar +ldar +lden +lia +mario +na +ndar +ndario +nderiel +ndra +nnon +nna +ntar +ntariel +nteriel +ny +raen +rel +ria +riel +ryn +ssi +teriel +ver +[end] diff --git a/plugins/util/names/elves_f.nam b/plugins/util/names/elves_f.nam new file mode 100644 index 0000000..928dafd --- /dev/null +++ b/plugins/util/names/elves_f.nam @@ -0,0 +1,74 @@ +[inf] +Elven female names, namefile by Johan Danforth +Edited by Arkhan +[first] +An +Am +Bel +Cel +C +Cal +Del +El +Elr +Elv +Eow +Ear +F +G +Gal +Gl +H +Is +Leg +Lem +M +N +P +R +S +T +Thr +Tin +Ur +Un +V +[mid] +a +a +adrie +ara +e +e +ebri +i +io +ithra +ilma +il-Ga +o +orfi +o +u +y +[final] +clya +lindi +di +dien +dith +dia +lith +lia +ndra +ng +nia +niel +rith +thien +thiel +viel +wen +wien +wiel +[end] diff --git a/plugins/util/names/elves_m.nam b/plugins/util/names/elves_m.nam new file mode 100644 index 0000000..0a2aca4 --- /dev/null +++ b/plugins/util/names/elves_m.nam @@ -0,0 +1,75 @@ +[inf] +Elven male names, namefile by Johan Danforth +Edited by Arkhan +[first] +An +Am +Bel +Cel +C +Cal +Del +El +Elr +Elv +Eow +Ear +F +G +Gal +Gl +H +Is +Leg +Lem +M +N +P +R +S +T +Thr +Tin +Ur +Un +V +[mid] +a +a +adrie +ara +e +e +ebri +i +io +ithra +ilma +il-Ga +o +orfi +o +u +y +[final] +l +las +lad +ldor +ldur +lith +mir +n +nd +ndel +ndil +ndir +nduil +ng +mbor +r +ril +riand +rion +wyn +[end] diff --git a/plugins/util/names/elves_n.nam b/plugins/util/names/elves_n.nam new file mode 100644 index 0000000..3cb5db1 --- /dev/null +++ b/plugins/util/names/elves_n.nam @@ -0,0 +1,50 @@ +[inf] +Nevermore elven surnames, namefile by Chris Gonnerman +[first] +Amara- +Bara- +Cora- +Dano- +Eura- +Fori- +Gora- +Hana- +Iaru- +Joro- +Kira- +Lana- +Mara- +Mira- +Nura- +Oro- +Palo- +Quara- +Rago- +Sana- +Taru- +Ulo- +Vana- +Wiro- +Yanu- +Yira- +Yalo- +Zoma- +[mid] +weah- +wor- +lora- +taum- +zea- +ro- +[final] +sigvd +augal +thanal +shanda +tanal +zand +[notes] +The High Elves of Nevermore never write their names with punctuation +between the parts, so the dashes here are improper, but they help +immensely with pronunciation. +[end] diff --git a/plugins/util/names/elves_t.nam b/plugins/util/names/elves_t.nam new file mode 100644 index 0000000..798c32a --- /dev/null +++ b/plugins/util/names/elves_t.nam @@ -0,0 +1,69 @@ +[inf] +Tolkien elven names, namefile by Johan Danforth +Edited by Arkhan +[first] +An +Bel +Cel +El +Elr +Elv +Eow +Ear +F +G +Gal +Gl +Is +Leg +Lem +N +S +T +Thr +Tin +[mid] +a +a +adrie +ara +e +e +ebri +i +io +ithra +ilma +il-Ga +o +orfi +o +u +y +[final] +l +las +lad +ldor +ldur +lindo +lith +mir +n +nd +ndel +ndil +ndir +nduil +ng +mbor +r +rith +ril +riand +rion +thien +viel +wen +wyn +[end] diff --git a/plugins/util/names/fantasy.nam b/plugins/util/names/fantasy.nam new file mode 100644 index 0000000..05368aa --- /dev/null +++ b/plugins/util/names/fantasy.nam @@ -0,0 +1,542 @@ +[inf] +General fantasy names, namefile by Brett Slocum +[first] +Ral +Na +Ard +Vald +Cal +Hy +Pan +Chies +Per +Er +Hob +Harg +Win +Mar +Quarne +Ba +Er +Odas +Ka +Mold +Syn +Ro +Jast +Yal +Nap +Vard +As +Binthe +Zald +Dez +Las +Uld +Nev +Haur +Bar +Das +Ty +Dar +Ost +Tral +Grave +Eth +Flar +Yal +Klab +Harab +Jar +Nor +Dain +Toc +Bay +Haith +Cal +Lar +Naut +Druc +Bar +Art +For +Mart +Yar +Ha +Ny +Yar +Verd +Wy +Plag +Ter +Haur +Var +Ar +Dar +Val +Mar +Car +Loc +Wearn +Dras +Bel +Har +Jar +For +Kil +Oc +Al +Skal +Nun +Az +Kop +Houl +Lab +Jar +Vast +Claune +Tes +Ob +Nist +El +Est +Zol +Brow +Pulg +Star +Kren +Crac +Scaun +Wal +Quer +Ry +Cyn +Rusk +Del +Lab +Mel +Sep +Lor +Ros +Jar +Daf +Hal +Kol +In +Ael +Sald +Kuv +Ym +Ca +Keld +Bar +Tarl +Shot +Pes +Quer +Lor +Geld +Ar +Har +Bae +Vad +Pas +Ur +Nor +Kir +Var +Mel +Ar +Shy +I +Rald +Cor +Sar +Kor +Rol +Har +Ash +Dir +Las +Vab +Ald +Par +Ob +Hor +Chy +Jar +Ryle +Char +Hab +Sar +Vart +Nist +Obr +Jar +Ge +Yas +Pav +Jes +Shot +Mar +Hor +Er +Ki +Har +Cal +And +[mid] +gur +carn +az +acy +ayn +asc +gary +hen +tan +arny +alen +carth +gant +rath +cam +art +ron +arth +arth +carad +ere +geth +aldy +yn +valer +arne +aller +varn +ar +an +nal +tyne +ar +art +ont +aur +aver +lyn +as +gar +cuth +arry +or +quine +astar +mel +aryn +art +war +asty +zane +arik +ayne +loc +oller +warty +aryne +chean +quin +tar +dar +reth +ant +an +yne +ax +tuny +wat +juin +a +gayn +on +an +car +gine +codd +quent +eas +ew +azer +am +ly +stead +orn +ar +cath +iera +que +air +la +art +erry +end +om +ast +et +arty +doth +cath +ert +dy +orn +ont +tak +ar +art +warne +arn +in +ian +el +ak +il +ydd +ime +yn +en +in +im +el +ar +ro +is +is +ro +era +ene +in +ane +iam +ain +ir +un +il +bin +lin +is +sene +bin +lir +ame +a +fyn +y +in +yd +ien +ain +yn +ar +er +in +sume +ras +id +mel +luth +ance +er +yn +an +ar +ayne +eth +len +ter +rik +er +ro +tin +mel +yn +ris +lene +ane +as +[final] +ty +carn +ar +acy +er +al +gary +y +ar +arny +alen +carth +gant +y +ber +art +dal +arth +arth +an +ere +geth +aldy +yn +valer +arne +aller +varn +ayne +an +nal +tyne +ayne +art +ont +ney +aver +lyn +iel +gar +y +arry +or +quine +astar +er +aryn +art +war +asty +zane +arik +ayne +an +oller +warty +aryne +chean +ta +un +tha +reth +ant +el +yne +el +tuny +wat +juin +dor +gayn +tyn +dar +car +gine +codd +quent +eas +ew +azer +ont +ly +stead +orn +en +cath +iera +que +air +la +art +erry +sa +ar +er +ern +arty +doth +y +ert +dy +orn +ont +ern +ayn +art +warne +arn +in +ian +el +ak +il +ydd +ime +yn +en +in +im +el +ar +ro +is +is +ro +era +ene +in +ane +iam +ain +ir +un +il +bin +lin +is +sene +bin +lir +ame +a +fyn +se +in +yd +ien +ain +yn +ar +er +in +sume +ras +on +mel +luth +ance +er +yn +an +ar +ayne +eth +nyd +ter +rik +nik +ro +a +mel +yn +ris +lene +ane +yr +[end] diff --git a/plugins/util/names/felana.nam b/plugins/util/names/felana.nam new file mode 100644 index 0000000..0c8750a --- /dev/null +++ b/plugins/util/names/felana.nam @@ -0,0 +1,118 @@ +[inf] +Felana (feline) names by Nathalie Hebert +[first] +Am +An +As +Ash +Ast +C +Chen +Chan +Char +Cher +Cer +Es +Esh +Is +Ish +Os +Osh +Us +Ush +Ys +Ysh +H +Ch +S +Shen +Sar +Sol +Shar +Shan +Sher +Shim +Sim +Sin +San +Sar +Ser +Sor +Shor +Sham +Sh +[mid] +a +ar +as +e +es +i +is +o +os +u +us +y +ys +er +or +ur +yr +ir +eri +ari +osh +ash +esh +ish +ush +ysh +en +an +in +on +un +yn +[final] +dar +mir +nir +nor +nar +ish +ash +osh +esh +isha +asha +esha +osha +orsha +a +e +i +o +u +y +sar +ser +sor +sir +der +sham +shor +shen +as +es +ys +seth +san +sin +sil +sur +sen +sean +dor +[end] + diff --git a/plugins/util/names/general.nam b/plugins/util/names/general.nam new file mode 100644 index 0000000..b2e7fcb --- /dev/null +++ b/plugins/util/names/general.nam @@ -0,0 +1,195 @@ +[inf] +Common fantasy names, namefile by Johan Danforth +Edited by Arkhan +[first] +A +Ab +Ac +Ad +Af +Agr +Ast +As +Al +Adw +Adr +Ar +B +Br +C +C +C +Cr +Ch +Cad +D +Dr +Dw +Ed +Eth +Et +Er +El +Eow +F +Fr +G +Gr +Gw +Gw +Gal +Gl +H +Ha +Ib +Jer +K +Ka +Ked +L +Loth +Lar +Leg +M +Mir +N +Nyd +Ol +Oc +On +P +Pr +R +Rh +S +Sev +T +Tr +Th +Th +V +Y +Yb +Z +W +W +Wic +[mid] +a +ae +ae +au +ao +are +ale +ali +ay +ardo +e +ei +ea +ea +eri +era +ela +eli +enda +erra +i +ia +ie +ire +ira +ila +ili +ira +igo +o +oa +oi +oe +ore +u +y +[final] + + + + + + + +a +and +b +bwyn +baen +bard +c +ctred +cred +ch +can +d +dan +don +der +dric +dfrid +dus +f +g +gord +gan +l +li +lgrin +lin +lith +lath +loth +ld +ldric +ldan +m +mas +mos +mar +mond +n +nydd +nidd +nnon +nwan +nyth +nad +nn +nnor +nd +p +r +ron +rd +s +sh +seth +sean +t +th +th +tha +tlan +trem +tram +v +vudd +w +wan +win +win +wyn +wyn +wyr +wyr +wyth +[end] diff --git a/plugins/util/names/harn_cln.nam b/plugins/util/names/harn_cln.nam new file mode 100644 index 0000000..2c6d45c --- /dev/null +++ b/plugins/util/names/harn_cln.nam @@ -0,0 +1,1121 @@ +[inf] +Hârnic clan (last) names +By Kimmo "Arkhan" Kulovesi, based on the Hârn names list +[first] +Aald +Aald +Ab +Abj +Abw +Ael +Aelw +Aer +Aeth +Aew +Af +Aik +Ain +Ak +Al +Alb +Ald +Ald +Alg +All +Als +Alv +Am +An +Anak +Ang +Anj +Ant +Ar +Aran +Arb +Ard +Ark +Arl +Arm +Art +As +Ash +Ast +Asw +At +Atej +Av +Aw +Az +B +B +Baj +Bal +Bald +Ban +Bar +Bard +Barg +Basr +Basw +Bavr +Bek +Bel +Ben +Berr +Bid +Bir +Bis +Bos +Br +Brab +Breb +Bur +Burz +Byg +C +Cad +Cadr +Calas +Call +Canj +Canw +Capl +Car +Cem +Ch +Chat +Chaw +Cheb +Chel +Ches +Chom +Cl +Clam +Clin +Col +Cor +Cos +Cr +Cyb +Cyc +Cys +D +Daar +Daas +Dag +Daj +Dal +Dalg +Dals +Dan +Dar +Das +Dav +Deb +Deh +Del +Dem +Dens +Dern +Ders +Dess +Dest +Deth +Dev +Dez +Dir +Dj +Dold +Dom +Dond +Dow +Drak +Drel +Dul +Dum +Dur +Dur +Durt +Dv +Dyr +Dys +Eab +Eag +Edal +Edl +Ek +Ekk +El +Elb +Elbr +Eld +Elek +Elg +Elj +Elkr +Eln +Elw +Em +Emr +Emyl +En +Enald +Enat'hr +Endr +Enw +Er +Erc +Erel +Erem +Erg +Erl +Ers +Es +Esh +Esl +Et +Eth +Ev +Ew +Ex +Eyl +Fain +Fal +Far +Feg +Fell +Fen +Fer +Fet +Fir +Fj +For +Forn +Fors +Fr +Fremb +Fris +Furd +Fyrd +G +G +Gakb +Galb +Galb +Gam +Gand +Gar +Gath +Gaths +Gavar +Gedm +Gel +Gelb +Geld +Gelt +Ger +Gl +Glar +Gorl +GosElg +Gr +Grath +Greb +Gui +Gul +Gurr +Gw +Gyb +Gyd +Gyers +H +H +H +Haid +Hal +Halw +Ham +Hamelw +Hamm +Han +Har +Harb +Hard +Hel +Henj +Heth +Hilr +Hind +Hip +Hj +Hod +Hol +Hols +Hor +Horb +Hors +Horv +Horw +Hub +Hud +Hul +Hulg +Hund +Hunv +Hur +Hurn +Hus +I +Iach +Iar +Ib +Ilm +Ind +Intr +Ir +Ird +Is +Is +Jaes +Jah +Jaks +Jam +Jan +Jar +Jarl +Jek +Jel +Jer +Joen +Jor +Jorl +Jukn +Jul +Jund +Jyks +Jyrd +K +K +K +K +K +K +K'v +K'v +Kad +Kap +Kar +Kard +Kh +Kj +Kl +Kob +Kr +Kyf +Kyg +Kyn +Kyn +Kyr +L +L +L +L +L'S +Lal +Lamr +Lar +Larl +Led +Leg +Len +Ler +Lerk +Let +Levr +Lind +Linth +Loth +Loth +M +M +M +M +M +Ma +MacGr +MacGunn +MacLoth +MacM +MacN +MacSoth +Mad +Mag +Mer +Merk +Merl +Mes +Mess +Mest +Meth +Mor +Mord +Mos +N +N +Ner +Net +Neth +Nilk +Nor +Nord +Nyr +O +Ob +Ob +Och +Och +Od +Ok +Om +On +Onp +Opr +Or +Orens +Org +Orl +Ost +Osyn +Ot +Oth +P +P +Pal +Pars +Part +Pas +Pas +Path +Patr +Patt +Pelg +Pelt +Pendr +Perg +Pers +Peth +Pharc +Pl +Pord +Pot +Pr +Q +Quar +Quarth +Quer +Quir +R +R +R +Rab +Rag +Rald +Ram +Ran +Resk +Rev +Rew +Rik +Rind +Rith +Rus +Rush +S +S +S +S +S +S +S' +S'g +Saarg +Sar +Sard +Sarh +Sed +Selbr +Sent +Ser +Seyln +Sh +Sheng +Shos +Sid +Sinar +Sir +Sk +Sl +Sm +Sm +Sm +Sold +Sp +St +Stahl +Stanl +Sud +Sund +Sur +Sv +Sw +T +T +T +T +T +Taam +Taar +Tald +Talv +Tard +Tesl +Tev +Th +Th +Thik +Tilr +Tix +Tob +Tob +Tol +Tom +Tomb +Tr +Tur +Tw +U +Ub +Ud +Ukr +Ul +Ulm +Ult +Un +Urd +Urg +Urm +Urph +Us +Utr +Uv +V +V +V +V +Vaag +Vald +Valh +Vand +Versw +Ves +Vid +Vill +Vind +Vir +Vort +Vurd +Vyl +Vyns +W +W +Wagn +Wain +Was +Web +Weth +Wor +Work +Wub +Wyll +Wyt +Wyth +X +Xyr +Y +Y +Yal +Yr +Yr +Yrag +Yrak +Z +Zar +Zh +Zhard +Zhird +Zw +[mid] +a +a +a +a +a +a +a +a +a +a +a +a +aa +aa +aa +aa +aa +aa +aa +ab +abe +abi +ada +ade +ae +ae +ae +ae +ae +aeu +age +ago +ahe +ai +ai +ai +ai +ai +ai +aja +aje +aka +ake +ala +ale +ali +aly +ama +ame +ana +ane +ani +ao +ara +ara +are +ari +ari +aria +arka +aro +ary +asa +asai +asti +ate +ati +ato +au +awa +axi +ay +e +e +e +e +e +e +e +e +e +ea +ea +eba +ebe +eda +ede +edi +edo +edse +edu +ee +ege +ego +ei +eja +eji +eka +eke +ela +ele +eli +elo +ema +ema +ema +eme +eme +eme +emi +ena +ende +ene +ene +eni +era +ere +eri +ery +esa +ese +esi +evi +ey +i +i +i +i +i +i +i +ia +ia +ibo +ido +ie +ie +iko +ila +ino +io +iri +isi +iti +iu +ive +ivi +n +ni +o +o +o +o +oa +obi +obo +oda +odi +oe +oge +ola +oli +olo +oma +ome +omo +ona +oni +ono +opa +ope +ora +ore +ori +ori +oro +oru +ory +osa +oso +osy +ota +ote +ou +ove +ovi +ovy +oy +u +u +u +u +ua +ube +uda +ude +udo +ue +ui +uma +una +une +uno +uo +ure +uri +ury +uzy +y +y +y +y +y +ya +ybe +yda +ye +yee +yi +yme +yni +yri +ysi +yt +yva +[final] +b +baar +bar +bbe +be +bo +bor +bor +bral +c +ch +ch +ch +cke +d +d +d +da +daar +dal +dar +dara +das +daso +dde +del +den +dge +din +dor +dos +doth +dre +dril +dwe +el +en +er +fa +ff +g +ga +gal +gar +gg +gor +h +hal +hem +hger +hl +hler +hn +hryn +hte +in +jud +k +k +k +ka +ka +kaar +kar +kel +kka +l +l +l +l +l +la +la +laan +laan +lar +lay +lbern +ld +ld +lda +ldin +ldor +ldri +ldur +ldy +le +le +len +ler +les +ley +lg +lin +lir +lis +lkes +ller +lman +lna +lon +los +lryd +ls +lsen +lsten +lsyn +lt +ltha +ly +lyn +lyn +lyne +m +m +m +ma +me +me +mel +men +met +mli +mnon +mon +ms +myn +myss +n +n +n +n +n +n +n +n +na +na +nal +nar +nas +nay +nbor +nce +nd +nda +ndak +ndal +ndik +ndin +ndis +ndsa +ndy +ne +ne +ne +nel +nes +ng +nga +ngar +nger +nion +nis +nla +nn +nna +nnar +non +nos +ns +nsal +nsen +nsor +nsyn +nt +ntar +ntel +nth +nther +nwyn +ny +nyr +or +pa +pe +pen +phar +phin +phis +pime +r +r +r +ra +rain +ras +rat +rben +rd +urd +rda +rda +rdan +rdas +rdi +rdia +rdin +re +ren +res +reth +rfet +rg +ri +ria +rian +ric +riel +rien +ril +rin +rina +rion +ris +rith +rji +rke +rken +rkyl +rl +rla +rlis +rm +rma +rn +rna +rnath +rne +ro +rol +ros +rra +rryn +rs +rsa +rse +rsi +rsil +rson +rt +rta +rtak +rth +rthan +rva +rvin +rwyn +ry +rz +rzand +s +s +s +s +sa +sa +saan +saar +sael +san +sara +se +sel +sen +sh +shara +shdrin +shel +shi +shoi +shre +sia +siel +sil +sin +sing +sk +skeld +slyle +sn +sraal +sral +ss +st +st +sta +staar +stas +sten +ster +stir +stra +syn +syr +t +t +ta +th +th +tha +thane +the +then +thor +thy +to +tren +tres +tt +tta +tte +tun +va +var +ve +vo +w +we +whyn +wi +ws +wyn +x +z +zien +[end] diff --git a/plugins/util/names/harn_f.nam b/plugins/util/names/harn_f.nam new file mode 100644 index 0000000..4dedc11 --- /dev/null +++ b/plugins/util/names/harn_f.nam @@ -0,0 +1,208 @@ +[inf] +Hârnic female names +By Kimmo "Arkhan" Kulovesi, based on the Hârn names list +[first] +A +Aaln +Al +Al +Am +Ann +Ap +Ash +Benl +Cel +Cyb +D +D +E +E +El +El +Elw +Ev +Evl +Ew +F +Fal +Fel +Gw +I +Iv +In +J +Jinl +Jud +L +L +L +Lem +Lyc +Lynd +Lyn +Lys +M +Mel +Meln +Min +N +Nin +Nil +Quen +Q +Q +S +S +S +Sen +Sh +Sus +Sys +Tes +Th +Uw +Un +Vel +Ven +Wel +Wen +Wend +Y +Y +Y +Yl +Yv +[mid] +a +a +a +aa +ae +ae +ae +ae +aly +aya +e +e +e +e +ea +ea +elae +eni +ey +i +i +i +i +ia +ia +ia +ie +ila +o +oi +u +u +ue +ui +y +y +y +y +y +[final] + +bael +da +da +de +deil +dia +diene +dre +dyen +e +fe +ga +hnia +l +l +l +l +la +la +la +lawn +lda +le +le +le +lea +lea +len +lene +leryn +lice +lila +lime +lina +lina +line +lise +lith +lla +lla +lya +lyn +lyne +lyne +lyth +ma +mlen +n +n +n +n +na +na +na +na +nde +ne +ne +ne +ne +nea +nela +nele +nia +nian +nila +nis +nne +nshea +rien +s +sa +sa +sale +se +se +se +sea +sla +sna +son +sse +ssea +sye +syn +syne +ta +ta +thine +thyle +tte +[end] diff --git a/plugins/util/names/harn_f2.nam b/plugins/util/names/harn_f2.nam new file mode 100644 index 0000000..5dd3002 --- /dev/null +++ b/plugins/util/names/harn_f2.nam @@ -0,0 +1,84 @@ +[inf] +Hârnic female names (simplified) +[first] +A +Ali +Amo +Be +Bi +Da +Div +E +Er +Fan +Fem +Fil +Hal +Hen +His +Sa +Sin +Sun +I +Inu +Lan +Lin +Nav +Nim +Rel +Rev +Tan +Tiv +Tus +[mid] +a +an +ea +ef +fa +hi +la +le +lo +ma +mi +n +na +ni +no +ra +ri +sa +si +ta +ti +tu +[final] +a +ama +an +ana +bia +ea +em +ess +da +dia +dim +in +ina +ma +mia +na +ne +ona +ola +ra +ria +ta +tia +tena +una +ua +via +[end] diff --git a/plugins/util/names/harn_gar.nam b/plugins/util/names/harn_gar.nam new file mode 100644 index 0000000..2a5603a --- /dev/null +++ b/plugins/util/names/harn_gar.nam @@ -0,0 +1,92 @@ +[inf] +Gargun names +[first] +Ak +Ar +Da +Du +Di +Er +Es +Fe +Fi +Ge +Gi +He +Hi +Ich +Il +In +Is +Ka +Ke +Kh +Kha +Khe +Le +Li +Me +Mu +Ok +Ov +Op +Os +Re +Ri +Ry +Ta +Th +Ti +Uk +Us +Za +Ze +Zch +[mid] +'de +'im +'le +'ut +as +at +be +az +ad +de +dez +ea +eh +ev +e +i +in +ki +li +ma +mak +r +u +ux +v +[final] +ak +as +ad +am +ek +er +ef +fez +fak +fuk +ik +ot +rt +rik +tek +uch +ulk +uk +ur +urk +[end] diff --git a/plugins/util/names/harn_k_f.nam b/plugins/util/names/harn_k_f.nam new file mode 100644 index 0000000..996e953 --- /dev/null +++ b/plugins/util/names/harn_k_f.nam @@ -0,0 +1,81 @@ +[inf] +Khuzdul female names +By Kimmo "Arkhan" Kulovesi, based on the Hârn names list +[first] +Ali +Amo +Be +Bi +Da +Div +Fan +Fem +Fil +Hal +Hen +His +Sa +Sin +Sun +Inu +Lan +Lin +Nav +Nim +Rel +Rev +Tan +Tiv +Tus +[mid] +a +an +ea +ef +fa +hi +la +le +lo +ma +mi +n +na +ni +no +ra +ri +sa +si +ta +ti +tu +[final] +a +ama +an +ana +bia +ea +em +ess +da +dia +dim +in +ina +ma +mia +na +ne +ona +ola +ra +ria +ta +tia +tena +una +ua +via +[end] diff --git a/plugins/util/names/harn_k_m.nam b/plugins/util/names/harn_k_m.nam new file mode 100644 index 0000000..6bff9f3 --- /dev/null +++ b/plugins/util/names/harn_k_m.nam @@ -0,0 +1,98 @@ +[inf] +Khuzdul male names +[first] +An +Ak +Al +Da +Der +Du +Di +Eve +En +Er +Es +Fa +Fe +Fi +Ga +Ge +Gem +Gi +Ha +He +Hi +Il +In +Is +Ka +Ke +Kh +Kha +Khe +La +Le +Li +Lo +Ma +Me +Ob +Ov +Op +Os +Ra +Re +Ri +Ry +Ta +Te +Th +Ti +Us +Uv +Za +Ze +[mid] +as +at +be +daz +d +de +dez +ea +eh +he +i +in +ki +li +ma +mak +r +u +v +[final] +ain +ais +ard +as +dan +el +er +ef +f +fam +fus +ik +im +ol +ot +rt +ri +tan +te +tel +ulm +ur +[end] diff --git a/plugins/util/names/harn_m.nam b/plugins/util/names/harn_m.nam new file mode 100644 index 0000000..6cc145b --- /dev/null +++ b/plugins/util/names/harn_m.nam @@ -0,0 +1,724 @@ +[inf] +Hârnic male names +By Kimmo "Arkhan" Kulovesi, based on the Hârn names list +[first] +Aad +Ab +Ad +Aer +Agl +Aidr +Aikr +Ail +Akat +Al +Alar +Alas +Alb +Ald +Aleg +Alh +Alor +Als +Alw +Am +Amer +Anafl +And +Anfl +Anr +Ans +Anv +Ar +Ar +Ar +Arb +Ard +Arl +Arm +Art +Arv +Arvj +Arw +As +Ash +Ash-K'v +Asl +Ast +Ast +At +Atam +Av +Aym +Azik +B +Bak +Bal +Bals +Balw +Bar +Bar +Bas +Ber +Ber +Bes +Bir +Birn +Bj +Bogn +Bor +Br +Br +Bratw +Brish +Brix +Bulw +Bur +Burk +Byrg +Caad +Cabr +Cael +Caem +Cal +Car +Caz +Cer +Ch +Ch +Chaf +Chaf +Chalm +Char +Char +Charid +Chr +Chun +Chun-J +Cl +Clem +Cliv +Cob +Col +Cor +Corb +Corf +Corn +Corth +Cras +Crest +Criss +Crol +Crow +Cud +Cyz +D +D +D +D +Dabl +Daf +Dag +Dal +Dalf +Daq +Darl +Dr +Dur +Durg +Dus +Dw +Dyr +Dys +Eaf +Eam +Eaw +Eb +El +Embr +End +Eoch +Eph +Er +Erc +Erd +Erg +Ern +Es +Esc +Et +Ev +Ew +Ez +F +F +Farg +Feb +Fel +Felj +Fer +Ferg +Fod +Fol +For +Fr +Fyn +G +G +Gar +Garr +Gath +Gebr +Gen +Ger +Gors +Gosh +Gr +Graz +Gun +Gw +H +H +Had +Hag +Hak +Hal +Hals +Ham +Han +Hantr +Hanus +Har +Harq +Hars +Havr +Hel +Hem +Her +Herm +Herp +Hest +Het +Hj +Hor +Horb +Hord +Hrak' +Hub +Ikar +Imad +Ind +Indr +Ir +Ird +Is +J +Ja- +Jan +Jarl +Jebr +Jel +Jenk +Jerd +Jethr +Jith +Josr +Julw +K +Kal +Kalv +Kam +Kar +Kard +Karn +Kas +Kasv +Kath +Keftr +Keir +Keld +Ker +Kil +Kl +Kor +Korb +Korg +Kv +Labr +Lak +Leb +Led +Ledr +Lelpr +Lenp +Lesc +Lin +Ll +Llast +Lon +Lor +Lorg +Lorq +Lud +Lum +Lynd +M +Mabr +Mal +Mald +Man +Mar +Mard +Mart +Marv +Matt +Meam +Medr +Mej +Mel +Mels +Melv +Mer +Merd +Mers +Mert +Merw +Mest +Meth +Methg +Mig +Mindr +Minz +Mir +Mokr +Mord +Morg +Mort +Musq +Myrn +Myrv +Nak +Nem +Nens +Ner +Nor +Norb +Olv +Op +Ord +Orh +Orman +Ort +Orth +Orv +Osth +Ov +P +Pl +Pr +Q +Quer +R +Ran +Rath +Rem +Ric +Rik +Rith +Rogr +S +Sal +Sar +Sar +Saur +Saur +Ser +Sh +Sor +Sorl +Sors +St +Sw +Syth +T +T +Tabr +Taeb +Taeldl +Tag +Tagb +Talb +Talv +Tam +Tamr +Tar +Tar +Tard +Tarv +Ter +Terr +Tev +Tez +Th +Tib +Tierg +Tog +Tol +Ton +Tor +Torbr +Torr +Tot +Tr +Treg +Tugr +Tur +Turg +Turv +Tuz +Tuzr +Tyar +Tyk +Tyr +Ul +Uld +Um +Un +Und +Urbr +Urien +Uth +Uthr +V +Val +Valh +Var +Vard +Varin +Vjald +Vl +Vor +Vorg +Vr +Vul +Vund +Vur +Vurk +Warn +Welr +Weltr +Wer +Wid +Wil +Work +Wyr +X +Xeld +Yald +Yarbr +Yard +Yarn +Ydr +Yeb +Yer +Yev +Yig +Yol +Yor +Yr +Yv +Z +Zorg +[mid] +a +a +a +a +a +a +aa +aa +ae +ae +ai +ar' +au +ay +e +e +e +e +e +ea +ee +eo +ey +i +i +i +i +ia +ie +ie +iu +o +o +o +oa +oe +ou +u +u +u +ua +ue +uy +y +y +y +y +ya +ye +[final] + +bad +bain +bar +bene +berry +beth +bin +bir +bis +bon +bra +bral +bran +bron +bryl +c +ch +ck +d +da +dah +dai +das +dd +de +del +den +dia +dlak +dle +do +don +dor +dos +fan +far +ffryn +g +ga +gan +gar +go +gor +gyn +gys +h +hnam +hran +k +k +ka +kain +kal +kan +ke +kin +l +l +l +la +ld +ld +lde +len +lir +ll +lom +lon +lren +lyr +m +ma +mael +man +marn +mber +me +mel +meld +min +mn +mosa +n +n +n +n-Aral +na +nal +nath +nath +nazar +nce +nd +nda +ndd +ndel +ndis +ndon +ndor +ndy +ne +ne +ned +nes +nid +nil +nis +nm +nn +nn +nna +nrae +ns +nsa +nsyl +nt +nt +nter +nton +ntor +nyl +nyn +nys +r +r +r +ra +rad +rader +rain +rak +rak-Diev +ral +rand +rant +rard +ras +rat +rath +rbel +rben +rd +rden +rdes +rdi +rdiar +rdis +rene +rgan +rgen +ri +rial +rian +rida +rik +rin +rine +ris +risa +rith +rjah +rk +rl +rlid +rlid +rm +rm +rn +rn +rna +rnan +rne +rnt +rny +ro +roas +ron +rond +rphet +rq +rri +rs +rsen +rsen +rshil +rt +rta +rth +rwar +ry +ryn +s +s +s +sa +san +sar +sar +sc +sdo +se +sel +sen +sh +shen +si +sid +sin +sir +sis +sta +stil +stra +sye +syr +t +ta +tan +tar +te +th +th +th +thar +thard +ther +thgir +thid +thtrasn +tta +va +ven +vin +von +w +wn +xa +y +z +zay +[end] diff --git a/plugins/util/names/harn_m2.nam b/plugins/util/names/harn_m2.nam new file mode 100644 index 0000000..d46a5f7 --- /dev/null +++ b/plugins/util/names/harn_m2.nam @@ -0,0 +1,107 @@ +[inf] +Hârnic male names (simplified) +[first] +A +An +Ak +Al +Da +Der +Du +Di +E +Eve +En +Er +Es +Fa +Fe +Fi +Ga +Ge +Gem +Gi +Ha +He +Hi +I +Il +In +Is +Ka +Ke +Kh +Kha +Khe +La +Le +Li +Lo +Ma +Me +O +Ob +Ov +Op +Os +Ra +Re +Ri +Ry +Ta +Te +Th +Ti +U +Us +Uv +Za +Ze +[mid] +as +at +be +daz +d +de +dez +ea +eh +he +i +in +ki +li +ma +mak +mi +r +u +v +[final] +ain +ais +ard +as +dan +den +el +er +ef +f +fam +fus +ik +im +ol +on +ot +r +rt +ri +tan +te +tel +ulm +ur +[end] diff --git a/plugins/util/names/harn_s_f.nam b/plugins/util/names/harn_s_f.nam new file mode 100644 index 0000000..420b089 --- /dev/null +++ b/plugins/util/names/harn_s_f.nam @@ -0,0 +1,84 @@ +[inf] +Sindarin female names +[first] +A +Al +Am +An +Ar +B +Ba +Be +Ca +Ce +Da +Do +E +El +Er +Fa +Fu +Ga +La +Le +Li +Ma +Mi +Mo +Na +Ni +Sa +Si +Th +Un +Va +[mid] +da +dar +dom +du +fi +fin +im +la +lai +lan +len +li +min +n +nar +or +ren +ria +ro +ran +st +tar +th +un +[final] +ind +ara +ana +del +dil +din +den +dan +in +hin +ian +iel +ila +ion +ira +nia +min +nil +nol +rel +ril +rina +tha +[end] diff --git a/plugins/util/names/harn_s_m.nam b/plugins/util/names/harn_s_m.nam new file mode 100644 index 0000000..ebf7c57 --- /dev/null +++ b/plugins/util/names/harn_s_m.nam @@ -0,0 +1,79 @@ +[inf] +Sindarin male names +[first] +A +Al +Am +An +Ar +B +Be +Ca +Ce +Do +E +El +Er +Fa +Fu +Gl +Le +Li +Mi +Mo +Na +Ni +Si +Th +Un +Va +[mid] +da +dar +dom +du +fi +fin +im +la +lai +lan +len +li +min +n +nar +or +ren +ria +ro +ran +st +tar +th +un +[final] +and +ar +del +dil +din +dir +dyne +en +er +hir +ian +iel +il +ion +ir +mar +mir +nil +nor +rel +ril +rin +th +[end] diff --git a/plugins/util/names/hobbits.nam b/plugins/util/names/hobbits.nam new file mode 100644 index 0000000..9b92524 --- /dev/null +++ b/plugins/util/names/hobbits.nam @@ -0,0 +1,26 @@ +[inf] +Tolkien hobbit names, namefile by Johan Danforth +Edited by Arkhan +[first] +B +Dr +Fr +Mer +Per +S +[mid] +a +e +i +ia +o +oi +u +[final] +bo +do +doc +go +grin +m +[end] diff --git a/plugins/util/names/human_f.nam b/plugins/util/names/human_f.nam new file mode 100644 index 0000000..1ea507a --- /dev/null +++ b/plugins/util/names/human_f.nam @@ -0,0 +1,179 @@ +[inf] +Female names (fantasy), namefile by Johan Danforth +Edited by Arkhan +[first] +A +Ab +Ac +Ad +Af +Agr +Ast +As +Al +Adw +Adr +Ar +B +Br +C +C +C +Cr +Ch +Cad +D +Dr +Dw +Ed +Eth +Et +Er +El +Eow +F +Fr +G +Gr +Gw +Gw +Gal +Gl +H +Ha +Ib +Jer +K +Ka +Ked +L +Loth +Lar +Leg +M +Mir +N +Nyd +Ol +Oc +On +P +Pr +Q +R +Rh +S +Sev +T +Tr +Th +Th +Ul +Um +Un +V +Y +Yb +Z +W +W +Wic +[mid] +a +a +a +ae +ae +au +ao +are +ale +ali +ay +ardo +e +e +e +ei +ea +ea +eri +era +ela +eli +enda +erra +i +i +i +ia +ie +ire +ira +ila +ili +ira +igo +o +oa +oi +oe +ore +u +y +[final] +beth +cia +cien +clya +de +dia +dda +dien +dith +dia +lind +lith +lia +lian +lla +llan +lle +ma +mma +mwen +meth +n +n +n +nna +ndra +ng +ni +nia +niel +rith +rien +ria +ri +rwen +sa +sien +ssa +ssi +swen +thien +thiel +viel +via +ven +veth +wen +wen +wen +wen +wia +weth +wien +wiel +[end] diff --git a/plugins/util/names/human_m.nam b/plugins/util/names/human_m.nam new file mode 100644 index 0000000..e4edadb --- /dev/null +++ b/plugins/util/names/human_m.nam @@ -0,0 +1,214 @@ +[inf] +Male names (fantasy), namefile by Johan Danforth +Edited by Arkhan +[first] +A +Ab +Ac +Ad +Af +Agr +Ast +As +Al +Adw +Adr +Ar +B +Br +C +C +C +Cr +Ch +Cad +D +Dr +Dw +Ed +Eth +Et +Er +El +Eow +F +Fr +G +Gr +Gw +Gw +Gal +Gl +H +Ha +Ib +J +Jer +K +Ka +Ked +L +Loth +Lar +Leg +M +Mir +N +Nyd +Ol +Oc +On +P +Pr +Q +R +Rh +S +Sev +T +Tr +Th +Th +Ul +Um +Un +V +Y +Yb +Z +W +W +Wic +[mid] +a +ae +ae +au +ao +are +ale +ali +ay +ardo +e +edri +ei +ea +ea +eri +era +ela +eli +enda +erra +i +ia +ie +ire +ira +ila +ili +ira +igo +o +oha +oma +oa +oi +oe +ore +u +y +[final] + + + + + + + +a +and +b +bwyn +baen +bard +c +ch +can +d +dan +don +der +dric +dus +f +g +gord +gan +han +har +jar +jan +k +kin +kith +kath +koth +kor +kon +l +li +lin +lith +lath +loth +ld +ldan +m +mas +mos +mar +mond +n +nydd +nidd +nnon +nwan +nyth +nad +nn +nnor +nd +p +r +red +ric +rid +rin +ron +rd +s +sh +seth +sean +t +th +th +tha +tlan +trem +tram +v +vudd +w +wan +win +win +wyn +wyn +wyr +wyr +wyth +[end] +/* h„r „r filen slut */ diff --git a/plugins/util/names/inns.nam b/plugins/util/names/inns.nam new file mode 100644 index 0000000..9978d0c --- /dev/null +++ b/plugins/util/names/inns.nam @@ -0,0 +1,129 @@ +A few of the (")best(") names I've gotten with this: + +Drunken Dragon +Puking Pit +Genie's Wish +Bob's Busom +Frozen Orc +Octopus Lady (You seen Octopussy?) +Thirsty Lips +Sexy Swords +Pot Pit +Broken Drum (Can't be beat! ;> (Terry Prachett)) + +[inf] +Inn/Tavern/Bar/Pub Names +By Kimmo "Arkhan" Kulovesi +[first] +Bent +Black +Blind +Blue +Bob's +Joe's +Broken +Buxom +Cat's +Crow's +Dirty +Dragon +Dragon's +Drunken +Eagle's +Eastern +Falcon's +Fawning +Fiend's +Flaming +Frosty +Frozen +Gilded +Genie's +Golden +Golden +Gray +Green +King's +Licked +Lion's +Mended +Octopus +Old +Old +Orc's +Otik's +Tika's +Pink +Pot +Puking +Queen's +Red +Ruby +Delicate +Sea +Sexy +Shining +Silver +Singing +Strange +Thirsty +Violet +White +Wild +Yawing +[mid] + +[final] + Axe + Barrel + Basilisk + Belly + Blade + Boar + Breath + Brew + Busom + Claw + Coin + Delight + Den + Dragon + Drum + Dwarf + Fist + Flea + Flower + Gem + Gryphon + Hand + Head + Inn + Lady + Maiden + Lantern + Lips + Monk + Mug + Nest + Orc + Pearl + Pig + Pit + Place + Tavern + Portal + Ranger + Rest + Sailor + Sleep + Song + Stool + Swan + Swords + Tree + Unicorn + Whale + Wish + Wizard + Rain +[end] diff --git a/plugins/util/names/items.nam b/plugins/util/names/items.nam new file mode 100644 index 0000000..51e466f --- /dev/null +++ b/plugins/util/names/items.nam @@ -0,0 +1,89 @@ +[inf] +Item names +By Kimmo "Arkhan" Kulovesi +[first] +Sword +Sword +Wand +Cloak +Robe +Stick +Staff +Ring +Amulet +Axe +Hammer +Shield +Halberd +Scythe +Scroll +Book +Book +Armor +Dagger +Bow +Lance +Mace +Flail +Javelin +Dart +Scourge +Spear +Sling +Rapier +Coin +Trident +Whip +Crown +Jewel +Ruby +Hoopak +Orb +Needle +Pin +[mid] + of +[final] + Valor + Magic + Power + Light + Kings + Knights + Shadows + Chaos + Flame + Faith + Fire + Death + Sorcery + Stoning + Hope + Healing + Pain + Hurting + Belar + Slaying + Haste + Avatar + Virtue + the Way + Angels + Devils + Speed + Flying + Seeing + Love + Hatred + Nagash + Sauron + Arthur + Ending + Torak + Aldur + Time + Evil + Morgoth + Lucifer + Arkhan +[end] diff --git a/plugins/util/names/narn.nam b/plugins/util/names/narn.nam new file mode 100644 index 0000000..ff2e454 --- /dev/null +++ b/plugins/util/names/narn.nam @@ -0,0 +1,70 @@ +[inf] +Babylon 5 Narn names by Kevin G. Nunn +[first] +Ch' +Do' +G' +Gre' +Mak' +Na' +Re' +Sh' +So' +T' +Ta' +Th' +Thu' +Tu' +[mid] +Ba +Bo +Da +Do +Ga +Ge +Go +Ka +Ko +La +Le +Lo +Ma +Mo +Na +No +Oo +Pa +Po +Qua +Quo +Ra +Rala +Ro +Sha +Shali +Ska +Skali +Sta +Ste +Sto +Ta +Te +Tee +To +Tha +Tho +Va +Vo +Vy +Wa +[final] +ch +k +kk +l +n +r +th +s +[end] + diff --git a/plugins/util/names/orcs_t.nam b/plugins/util/names/orcs_t.nam new file mode 100644 index 0000000..4d83273 --- /dev/null +++ b/plugins/util/names/orcs_t.nam @@ -0,0 +1,42 @@ +[inf] +Tolkien orc names by Johan Danforth and Tobias Petersson +Edited by Arkhan +[first] +B +Er +G +Gr +H +P +Pr +R +V +Vr +[mid] +a +i +o +u +[final] +dash +dish +dush +gar +gor +gdush +lo +gdish +k +lg +nak +rag +rbag +rg +rk +ng +nk +rt +ol +urk +shnak +[end] diff --git a/plugins/util/names/orcs_wh.nam b/plugins/util/names/orcs_wh.nam new file mode 100644 index 0000000..1c395d5 --- /dev/null +++ b/plugins/util/names/orcs_wh.nam @@ -0,0 +1,71 @@ +[inf] +Warhammer orc names, namefile by Johan Danforth and Tobias Petersson +Edited by Arkhan (use tolkien orc name for first name, and this for last) +[first] +Head +Face +Eye +Arm +Foot +Toe +Ear +Nose +Hair +Blood +Nail +Night +Snotling +Beast +Man +Finger +Goblin +Hobbit +Teeth +Elf +Rat +Ball +Ghoul +Knife +Axe +Wraith +Deamon +Dragon +Tooth +Death +Mother +Horse +Moon +Dwarf +Earth +Human +Grass +[mid] + +[final] +killer +crucher +lover +thrower +throttler +eater +hammer +kicker +walker +puncher +dragger +stomper +torturer +ripper +mangler +hater +poker +chewer +cutter +slicer +juggler +raper +smasher +shooter +drinker +crawler +[end] diff --git a/plugins/util/names/wc_cats.nam b/plugins/util/names/wc_cats.nam new file mode 100644 index 0000000..a030fc0 --- /dev/null +++ b/plugins/util/names/wc_cats.nam @@ -0,0 +1,126 @@ +[inf] +[first] +Misty +Mist +Blossom +Claw +Breeze +Wind +Thunder +River +Stream +Rat +Long +Pebble +Stone +Rose +Tiger +Leopard +Sky +Wolf +Mouse +Hazel +Kestrel +Serval +Snow +Blue +Red +Birch +Willow +Grass +Maple +Dawn +Shimmer +Poppy +Fox +Opal +Badger +Grass +Shade +Shaded +Swift +Huge +Feather +Sand +Flower +Petal +Cherry +Lavender +Thorn +Thistle +Scar +Vole +Shrew +Bug +Beetle +Spider +Oak +Small +Big +Tiny +seed +Little +Tall +Vine +Lion +Jay +Holly +Berry +Dove +Leaf +Squirrel +Bent +Crooked +Bracken +Flame +Yellow +Grey +Lily +Seed +Bark +Blaze +[mid] + +[final] +tail +shine +shade +breeze +foot +cloud +petal +thorn +heart +streak +stripe +dapple +spot +blaze +leg +claw +talon +feather +storm +leap +flight +petal +fall +wing +whisker +step +nose +poppy +shimmer +mist +blaze +light +stream +flow +berry +shadow +willow +frost +shard +scar +blade +flame \ No newline at end of file diff --git a/plugins/util/names/wc_tribes.nam b/plugins/util/names/wc_tribes.nam new file mode 100644 index 0000000..e8262e3 --- /dev/null +++ b/plugins/util/names/wc_tribes.nam @@ -0,0 +1,69 @@ +[inf] +Warrior Cats tribe names lolol +[first] +Tribe of +[mid] +Rushing +Blazing +Burning +Searing +Screeching +Turning +Falling +Rising +Swaying +Shining +Lapping +Running +Breaking +Roaring +Pouring +Awakening +Peaceful +Fallen +Hopeful +Gentle +Breezey +Deadly +Blooming +Glaring +Broken +Drifting +Peaceful +Raging +Cloudy +Flying +Rippling +Furious +Mystic +Shattered +Blossoming +[final] +Rocks +Clouds +Flames +Fire +Dreams +Hope +Wind +Water +Stars +Talons +Flight +Trees +Wings +Ripples +Thunder +Shade +Shadows +Claws +Talons +Fury +Mud +Mysteries +Shards +Ash +Ashes +Flowers +Petals +Blossoms \ No newline at end of file diff --git a/plugins/util/shorten.py b/plugins/util/shorten.py new file mode 100644 index 0000000..55714e2 --- /dev/null +++ b/plugins/util/shorten.py @@ -0,0 +1,27 @@ +# # Lukeroge +from util import hook, http + +try: + from re import match + from urllib2 import urlopen, Request, HTTPError + from urllib import urlencode + +except ImportError, e: + raise Exception('Required module missing: %s' % e.args[0]) + +def tiny(url, user, apikey): + try: + params = urlencode({'longUrl': url, 'login': user, 'apiKey': apikey, 'format': 'json'}) + j = http.get_json("http://api.bit.ly/v3/shorten?%s" % params) + if j['status_code'] == 200: + return j['data']['url'] + raise Exception('%s'%j['status_txt']) + except HTTPError, e: + return "Invalid URL!" + +@hook.command +def shorten(inp, bot = None): + ".shorten - Makes an j.mp/bit.ly shortlink to the url provided" + user = bot.config['api_keys']['bitly_user'] + api = bot.config['api_keys']['bitly_api'] + return tiny(inp, user, api) diff --git a/plugins/word.py b/plugins/word.py new file mode 100644 index 0000000..6b2ac12 --- /dev/null +++ b/plugins/word.py @@ -0,0 +1,19 @@ +import re +from util import hook, http +from BeautifulSoup import BeautifulSoup + +@hook.command(autohelp=False) +def wordu(inp, say=False, nick=False): + ".word -- gets the word of the day + return "true" + page = http.get('http://merriam-webster.com/word-of-the-day') + + soup = BeautifulSoup(page) + + word = soup.find('strong', {'class' : 'main_entry_word'}) + function = soup.find('p', {'class' : 'word_function'}) + + #definitions = re.findall(r':' + # r' *([^<]+)', content) + + say("(%s) The word of the day is: \x02%s\x02 (%s)" % (nick, word, function)) \ No newline at end of file diff --git a/plugins/wordoftheday.py b/plugins/wordoftheday.py index 78a6989..7ab671b 100644 --- a/plugins/wordoftheday.py +++ b/plugins/wordoftheday.py @@ -1,5 +1,5 @@ import re -from util import hook, http +from util import hook, http, misc from BeautifulSoup import BeautifulSoup @hook.command(autohelp=False) diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..e69de29