How to connect directly mod and remote mysql server?

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

How to connect directly mod and remote mysql server?

by Pitriss » Sun Feb 23, 2014 18:06

Hi, can someone explain to me how to use some LuaJit woodoo to connect to remote mysql server? I want to create mod which will send all chat messages into remote DB, and show that chatlog on website.

I have functional logging to file but with mysql will be much better for further processing.
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Sun Feb 23, 2014 18:10

I don't think that this is possible with the current API...
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

by Pitriss » Sun Feb 23, 2014 19:56

Luajit supports some extensions.. And when IRC mod can use external app, then it should be possible..
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
 

jenova99sephiros
Member
 
Posts: 158
Joined: Sat Aug 03, 2013 15:16
In-game: Jenova

by jenova99sephiros » Mon Feb 24, 2014 02:46

If the display of the LOG IRC using the IRC · · ·
I pull out only chat what is displayed on the console or it ...
I english google translator
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Mon Feb 24, 2014 03:30

You will probably have to install LuaSQL

http://keplerproject.org/luasql/manual.html
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Mon Feb 24, 2014 12:12

You can do with luajit:

http://luajit.org/ext_ffi_tutorial.html

you need to do some rewrite in mysql.h to get it working.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Mon Feb 24, 2014 17:33

You can execute shell (terminal) commands from Lua.

If you are on linux, this is a good method.
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

by Pitriss » Tue Feb 25, 2014 08:11

aldobr wrote:You can do with luajit:

http://luajit.org/ext_ffi_tutorial.html

you need to do some rewrite in mysql.h to get it working.


Looks interesting, thanks I will try to play with that a bit..
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron