Esempio n. 1
0
def init():
    modules.add_hook("unloaded", hook_unloaded)
    register_tag("root", tag_root)
    register_tag("set", tag_set)
    register_tag("ltag", tag_ltag)
    register_tag("rtag", tag_rtag)
    register_tag("lcont", tag_lcont)
    register_tag("rcont", tag_rcont)
    command.ComHook("eval", command_eval, name="EvalBot")
Esempio n. 2
0
def init():

    command.ComHook('autoreplace',command_toggle_autoreplace)
    command.ComHook('replace',command_replace,"ReplaceBot")
    command.ComHook('rxreplace',command_rxreplace,"ReplaceBot")
    command.ComHook('unreplace',command_unreplace,"ReplaceBot")
    command.ComHook('getreplacements',command_getreplacements,"ReplaceBot")
    modules.add_hook('message',message_hook)

    data.query('''CREATE TABLE IF NOT EXISTS replacebot_subs
    (find TEXT, replace TEXT, is_regex INTEGER,  setby TEXT,
    PRIMARY KEY (find))''')
Esempio n. 3
0
def init():
    global word_dict

    try:
        word_dict = json.load(open("data/language.txt"))
    except (IOError, ValueError):
        f = open("data/language.txt","w")
        f.write("{}")
        f.close()
        worword_dictds = json.load(open("data/language.txt"))

    modules.add_hook('message',respond_hook)
    command.ComHook("lolbot",command_lolbot)
Esempio n. 4
0
def init():

    command.ComHook('omegle',start_omegle)
    command.ComHook('endomegle',end_omegle)
    modules.add_hook('message',message_hook)
Esempio n. 5
0
def init():

    modules.add_hook('message',nouns_hook)
    modules.add_hook('message',shinbro_hook)