Update plugins/namegen.py

This commit is contained in:
lukeroge 2011-11-22 22:40:18 +13:00
parent 776c725e19
commit f974bbb66d

View file

@ -1,5 +1,5 @@
from util import hook,molecular from util import hook,molecular
import unicodedata import string
@hook.command() @hook.command()
def namegen(inp, say = None, nick = None, input=None, notice=None): def namegen(inp, say = None, nick = None, input=None, notice=None):
@ -9,15 +9,19 @@ def namegen(inp, say = None, nick = None, input=None, notice=None):
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"]
modules = [] modules = []
inp.lower()
if inp == "list": 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")
return return
if inp: if not inp:
modules = inp.split(' ')
if inp == "all":
modules = all_modules
else: else:
modules = ["human_m", "human_f"] modules = inp.split(' ')
for module in modules: for module in modules:
if module in all_modules: if module in all_modules: