Page 1 of 1

How to connect directly mod and remote mysql server?

PostPosted: Sun Feb 23, 2014 18:06
by Pitriss
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.

PostPosted: Sun Feb 23, 2014 18:10
by webdesigner97
I don't think that this is possible with the current API...

PostPosted: Sun Feb 23, 2014 19:56
by Pitriss
Luajit supports some extensions.. And when IRC mod can use external app, then it should be possible..

PostPosted: Mon Feb 24, 2014 02:46
by jenova99sephiros
If the display of the LOG IRC using the IRC · · ·
I pull out only chat what is displayed on the console or it ...

PostPosted: Mon Feb 24, 2014 03:30
by BrandonReese
You will probably have to install LuaSQL

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

PostPosted: Mon Feb 24, 2014 12:12
by aldobr
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.

PostPosted: Mon Feb 24, 2014 17:33
by rubenwardy
You can execute shell (terminal) commands from Lua.

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

PostPosted: Tue Feb 25, 2014 08:11
by Pitriss
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..