|
@@ -6,7 +6,7 @@ The port will need to be defined when the instance is inited.
|
|
|
|
|
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
-import string, time, direct, inspect
|
|
|
|
|
|
|
+import string, time, direct, inspect, socket
|
|
|
from operator import itemgetter
|
|
from operator import itemgetter
|
|
|
from direct.http import WebRequest
|
|
from direct.http import WebRequest
|
|
|
from socket import gethostname
|
|
from socket import gethostname
|
|
@@ -42,6 +42,8 @@ class aiWebServer(SystemInformation):
|
|
|
self.web.registerGETHandler('magicWord', self.magicWord)
|
|
self.web.registerGETHandler('magicWord', self.magicWord)
|
|
|
self.startCheckingIncomingHTTP()
|
|
self.startCheckingIncomingHTTP()
|
|
|
|
|
|
|
|
|
|
+ self.air.setConnectionURL("http://%s:%s/" % (socket.gethostbyname(socket.gethostname()),self.HTTPListenPort))
|
|
|
|
|
+
|
|
|
def magicWord(self, replyTo, **kw):
|
|
def magicWord(self, replyTo, **kw):
|
|
|
# This will process Magic Word requests
|
|
# This will process Magic Word requests
|
|
|
# Currently the following words are supported:
|
|
# Currently the following words are supported:
|