diff options
Diffstat (limited to 'pyaiml_bot.py')
-rw-r--r-- | pyaiml_bot.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pyaiml_bot.py b/pyaiml_bot.py index 2a41848..587d01b 100644 --- a/pyaiml_bot.py +++ b/pyaiml_bot.py @@ -7,14 +7,15 @@ from omegle import OmegleChat import aiml k=aiml.Kernel() -k.bootstrap(learnFiles="aiml_files/std-startup.xml", commands="load aiml b") +#k.bootstrap(learnFiles="aiml_files/std-startup.xml", commands="load aiml b") +k.bootstrap(learnFiles="aiml_files/German-standalone.aiml") -class MegahalBot(OmegleChat): +class PyAIMLBot(OmegleChat): def __init__(self,disconnect_event,name,host="omegle.com",color=0): self.disconnect_event = disconnect_event self.name=name self.color = color - OmegleChat.__init__(self,name=" Megahal",host=host) + OmegleChat.__init__(self,name=" PyAIML",host=host) self.idlecount = 0 @@ -53,7 +54,7 @@ class MegahalBot(OmegleChat): time.strftime("%H:%M:%S"), "Stranger", message),bold=True,color=32) self.idlecount = 0 time.sleep(0.05) - self.logger.info("Megahal simulate typing") + self.logger.info("Bot simulate typing") # typestr = "%s [EVT] %s: typing" %(time.strftime("%H:%M:%S"),self.name) #print self.c(typestr,bold=True,color=32) try: @@ -83,7 +84,7 @@ if __name__ == "__main__": host = "omegle.com" local=False - logging.basicConfig(level=logging.ERROR) + logging.basicConfig(level=logging.DEBUG) if local: print "CTRL-C\n>>> ", while True: @@ -92,7 +93,7 @@ if __name__ == "__main__": else: print "press ctrl-c to abort" event = Event() - bot=MegahalBot(event,"A",host=host,color=31) + bot=PyAIMLBot(event,"A",host=host,color=31) bot.start() |