* silence cppdap lib
* refornat curl flags for readabilty
* zlib was build with the wrong runtime mode. Updated version
* use mariadb connector instead of mysql
* removed mysql define
* removed mysql
* removed installation of mysqlclient in workflow runs
* fixed curl install dir
* missing zstd on macos
* fixed module parsing for cmake 4.x
* docs
* added mariadb build to tidy_pr_check
* test sql on all platforms
some plugins need to included on windows
* let clang-tidy do its thing
* Automated clang-tidy change: modernize-use-override
* compile test
---------
Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
* update grammar
* add ast nodes; ast building
* Rename to unpacking
* semantic analysis
* executor work part 1, unpacking indices
* renamings; implement index binding
* small cleanup
* use multi_index; more tests
* use multi_index only for rest, otherwise list
* initial formatting
* add missing token decoding
* address self-review comments
* formatting tweaks
* add test for var binding in classes
* add StringIterator
* fix spread tests
* add cfgfile iterator; add cfgelem opersubscript; tests
* add iterator for SQLResultSet and SQLRow; tests
* Copy value in take global/local
* Allow any iterable can index rest unpacking
Always use dictionary as rest object in index unpacking
* add docs, core-changes, doc tests
* formatting changes...
* address self-review comments
* update formatter, format all binding test srcs
* address review comments
- unset var scope
* add cfgfile/cfgelem docs
* reformat objref svg
* added sql tests (linux only)
* add mysql_escape_string module function
its now possible to define a port for sql connection. (0 means default
sql port like before)
* escape string can fail, return error in this case
* rebuild antlr
* added docs
* POLLOG* macros use the new formatting
removed all old logging functions
* removed old fmt lib from everything except StreamWriter
removed unneeded functions
* fixed review comments
* use c++14 on linux, visual studio still undefined which means highest
available
* removed make_unique.h due to c++14 no more needed
* stumbled across pre c++14 code
* Removed use of boost::make_unique<> (updated to C++14)
Co-authored-by: turleypol <turley@polserver.com>
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
Currently plib/systemstate, pol/uvars, pol/ucfg, pol/multi/multidef
Next step should be to split them based on usage, since its currently a bit of include hell...
made the sql module at least a bit more scriptfriendly: its now save to pass sql objects as parameters, result objects get automatically freed. Thus also removed the mysql_free_result function.
mysql_close is also now senseless, but kept for the guys who want to close the connection direct.
All I could do in half an hour sorry..
Never ever pass a C API directly into a scripting language!
And now the complete class: "Never ever ..."
Added a quick&dirty connection wrapper guard, so the connection object can be copied aka given as function parameter.
Result stuff needs to be also wrapped, every 5 minutes my server crashed while playing around with it, since some functions secretly create objects which needs to be destructed in a discrete order...
bool check of the Connection object is now not always true, instead only true if connection is still active.
Added: pol/sqlscrobj.cpp pol/sqlscrobj.h
Changed: pol/module/sqlmod.cpp pol/module/sqlmod.h
Add preliminary MySQL database support.
New eScript objects: BSQLConnection, BSQLResultSet, BSQLRow
Added several new sql module functions:
mysql_connect(host,username,password);
mysql_query(connection,query);
mysql_fetch_row(result);
mysql_affected_rows(result);
mysql_num_fields(result);
mysql_num_rows(result);
mysql_select_db(connection,database);
mysql_field_name(result,column_index);
mysql_free_result(result);
mysql_close(connection);
In order to build with MySQL support, define the HAVE_MYSQL preprocessor directive in your build configuration.
You must have the MySQL headers and libraries installed.
Only really tested with dynamically linking mysql libraries on Linux.
Added: pol/network/auxclient.h
Changed: pol/network/auxclient.cpp pol/module/osmod.cpp pol/module/osmod.h clib/socketsvc.cpp clib/socketsvc.h
Moved AuxClient-related classes to its own header file (shared between auxclient.cpp and osmod.cpp)
Implemented os::OpenConnection() to create outgoing TCP/IP connections.
Changed: runecl/runecl.cpp
Added the sql module to runecl to allow quick testing
Changed: pol/uoscrobj.cpp pol/mobile/charactr.cpp pol/mobile/character.h bscript/parser.cpp bscript/objmembers.h
Added read/write property "mountedsteps" for mobiles. Represents number of steps taken while character was mounted.
Changed: bscript/parser.cpp
Declaring an array only using "{}" will show a compiler warning; please explicitly state 'array', 'struct', or 'dictionary'
Changed: pol/pol.cpp
If using Linux, remove pol.pid on shutdown of pol.
Changed: pol/uoexec.h pol/scrsched.cpp
Added script option "AUXSVC_ASSUME_STRING" which will allow aux service connections to send and receive non-packed strings.
Changed: ecompile/ecompile.cpp
If using Linux, a slash ("/") cannot be used to define ecompile options to allow support for absolute filenames.
Changed: bscript/object.cpp bscript/bobject.h
Implemented array operation MultiSubscript. Will return a splice of an array, eg:
array{"a","b","c","d","e"}[2,4] will return array{"b","c","d"}