28 Commits

Author SHA1 Message Date
Alex King
2a6cf8c8e7
[Strings] Add more number formatters (#2873)
* [Strings] Add more number formatters

# Notes
- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.

* [Strings] Add more number formatters

- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.

* Rebase cleanup

* Changes/benchmarks/tests

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-03-04 17:01:19 -06:00
Chris Miles
dfd8f84cac
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint

* More functions converted

* Commify

* More functions

* Fin

* Sort declarations

* Split functions between files

* Bots

* Update strings.h

* Split

* Revert find replaces

* Repository template

* Money

* Misc function

* Update CMakeLists.txt

* Saylink

* Update strings.cpp

* Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database

* API casings
2022-07-14 02:10:52 -05:00
Chris Miles
6e26e8953c
[Loginserver] Health Checks (#1665)
* Health checks stash

* Healthcheck work
2021-11-03 14:39:51 -05:00
Chris Miles
d87db648c3
[Loginserver] Code Cleanup and Tweaks (#1653)
* if for whatever reason the world server is not sending an address, use the local address it sends

* Log when world is sending loginserver info

* Force legacy mode when login host is login.eqemulator.net to avoid misconfigurations at least until things change

* Add human IP translation to log messages

* Sanitize world server name

* Code cleanup and renaming member variables

* More cleanup

* Remove this->

* Validation constants

* Key worldserver lookups by both longname and shortname both

* Update allowed character list

* Fix short_name API response field; add world_id to response

* Shorten receiver verbosity

* Remove unnecessary member variables from database and rename database to m_database

* Adjust MAX_SERVER_VERSION_LENGTH

* Fix indents
2021-10-30 19:09:42 -05:00
Akkadius
084e588843 Add /v1/ API route prefix 2019-09-17 00:49:51 -05:00
Akkadius
578fafb485 Fix rule logging 2019-09-16 23:48:32 -05:00
Akkadius
4e2b2aca6a Add response codes to loginserver api reponses 2019-09-16 23:40:06 -05:00
Akkadius
edf93f20e5 Update loginserver_webserver.cpp 2019-09-08 03:24:02 -05:00
Akkadius
4f20236440 Adjust external endpoint [skip ci] 2019-09-08 03:21:03 -05:00
Akkadius
40696a132b Add another API endpoint [skip ci] 2019-09-08 03:03:52 -05:00
Akkadius
dad1efbeaa Add api endpoint for updating an external account link reference [skip ci] 2019-09-07 19:24:27 -05:00
Akkadius
25a5310f49 Add login account_id in validation response 2019-08-10 07:04:52 -05:00
Akkadius
f39684b7f7 API adjustments 2019-08-10 05:36:22 -05:00
Akkadius
f06ff14f9e Squash exception in ParseRequestBody 2019-08-10 05:14:39 -05:00
Akkadius
8a2fce83e0 Adjust API handlers 2019-08-10 04:56:50 -05:00
Akkadius
ea15e9bc5f Fix bug with command length 2019-08-09 00:43:25 -05:00
KimLS
6a64d845c2 Async eqemu login credential lookup 2019-08-08 18:45:10 -07:00
Akkadius
4ec210c411 Update web api errors 2019-08-04 05:09:05 -05:00
Akkadius
ba6009730b Add CLI and Web endpoints to change local login account password 2019-08-04 05:04:34 -05:00
Akkadius
b0d33f094d Add local credential validation logic 2019-08-04 04:16:14 -05:00
Akkadius
5ff0f4851e Add path to http request logging, add email to local account creation through web endpoint 2019-08-04 03:11:30 -05:00
Akkadius
63e1599e9b Remove colon from bearer API key 2019-08-04 03:06:09 -05:00
Akkadius
4498819fad Abstracted CLI command handling interface, streamlined more logging 2019-08-04 02:58:26 -05:00
Akkadius
e92d130538 Adust ProcessUsertoWorldReq reponse codes 2019-07-15 02:21:19 -05:00
Akkadius
d8f34651de Streamline worldserver authorization handlers, cleanup and refactoring 2019-07-08 20:25:37 -05:00
Akkadius
c2917a9004 Take in API requests via json payload instead of params 2019-07-07 19:57:05 -05:00
Akkadius
392b328a95 Centralize local account creation and create API endpoint for creation 2019-07-07 04:32:59 -05:00
Akkadius
78d8b909be Add standalone web api server, cli handler, authorization, commands 2019-07-07 03:13:04 -05:00