Jump to content

restart by eluna?


Recommended Posts

in most cases you can do a lot stuff but some of them is ugly))

1. seems like ELUNA can write to DB - Global:WorldDBQuery. read this http://crazytechthoughts.blogspot.com/2011/12/call-external-program-from-mysql.html 

so by query your trigger can exec something that will do WinApi Sendmessage or Postmessage to mangos console or something like. there plenty ways to send or type in server console "server shutdown 1" it will shutdown server

2. lua can write to file. so you need background application that will watch on some file.txt and if there appear some text like 123123 then this app will type "server shutdown 1" is server console.

Link to comment
Share on other sites

  • 1 month later...

I personally wouldn't recommend this because if your Eluna script breaks potentially anyone could restart the server. Using Eluna for non-secure functions is probably OK.

There are three ways already to do this:

1) Log a gm account into the game.

2) Connect via telnet to port 3443 (must be enabled in config, personally, I ssh to the server and then run telnet to localhost because telnet is not encrypted).

3) Do it through systemctl (linux) or manually from windows command line. (More reliable than any of the other methods in my experience. Sometimes .server restart doesn't always bring it back up.)

Also, it's a matter of efficiency in that you are literally reinventing the wheel for very little payout. By the time you get through some other method of doing this you could have literally improved anything else with your server and your time would have been better spent there. Also, worth mentioning that DB queries through the Eluna interface create big performance hits. https://github.com/ElunaLuaEngine/Eluna/blob/master/docs/IMPL_DETAILS.md  Pay attention to the part about DB queries and how Mangos does it - generally Mangos loads them all in at boot and never again. Repeatedly polling this or files is nearly the same complexity/performance hit and if something goes wrong with the polling process you will lock up the server most likely.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use