Event Hook for WebRequest unsuitable for my needs
FuhrerDarqueSyde
Join Date: 2004-10-04 Member: 32076Members, Constellation
![FuhrerDarqueSyde](https://forumsdata.unknownworlds.com/uploads/userpics/220/nCDKILRQ7TTH9.jpg)
The event is available but not usable for my needs since the only function currently hooked to it (OnWebRequest in ServerWebInterface.lua) returns in every case (else statement at the bottom). I understand my function will execute but I need to be able to handle an additional request value.
Currently, I am trying to add a new actions.request handler by adding my own function to the event as well but the original function returns before mine has a chance to handle and return due to this else statement.
Anyone have any ideas? I can't hook and replace the original OnWebRequest() because it is local and short of modifying the source on my server, which I am desperately trying to avoid for mod creation sake, I am running out of options.
Currently, I am trying to add a new actions.request handler by adding my own function to the event as well but the original function returns before mine has a chance to handle and return due to this else statement.
Anyone have any ideas? I can't hook and replace the original OnWebRequest() because it is local and short of modifying the source on my server, which I am desperately trying to avoid for mod creation sake, I am running out of options.
Comments
Not an ideal solution but it is all I can do until a more appropriate adjustment is made. I need to be able to provide my server logs to my admins without giving them access to the file system.
Here's an alternative solution and some very bad advice which I haven't tried, but should work:
Hook the Event.Hook method.
Server.lua snippet
My working (after modifying ServerWebInterface.lua) code
I'm wary on hooking Event.Hook, though it should be fine.