37 Commits

Author SHA1 Message Date
Aeadoin
eb51550109
[Cleanup] Cleanup Strings::ToInt uses. (#3142)
* [Cleanup] Cleanup Strings::ToInt uses.

* fix for conversion

* remove != 0

* cleanup
2023-03-25 20:32:30 -04:00
Aeadoin
2e2c4d64fe
[Cleanup] Cleanup uses of Strings::ToInt to match correct type. (#3054)
* [Cleanup] Cleanup uses of Strings::ToInt to match correct type.

* cleanup
2023-03-22 12:22:03 -04:00
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
40d1c33351
[Logging] Logging Improvements (#2755)
* Console logging improvements

* stderr handling

* Add origination information

* Formatting

* Update zoneserver.cpp

* Update eqemu_logsys.cpp

* Remove semicolon from MySQLQuery log output

* Remove IsRfc5424LogCategory

* Remove no longer used functions

* Remove definition BUILD_LOGGING

* Deprecate categories UCSServer & WorldServer

* Deprecate UCS / World Server / Zone Server categories

* Deprecate Status, QSServer, Normal

* Update login_server.cpp

* Deprecate Emergency, Alert, Critical, Notice

* Deprecate Alert

* Fix terminal color resetting

* Deprecate headless client

* Move LogAIModerate to Detail

* Deprecate moderate logging level for detail

* Update logs.cpp

* Logs list simplify

* Update logs.cpp

* Add discord to log command

* Remove unused headers

* Windows fix

* Error in world when zones fail to load

* Show warning color properly

* Keep loginserver thread log from colliding with other logs during startup

* Deprecate Loginserver category
2023-01-17 21:18:40 -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
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
Chris Miles
bcb0e43d13
[Logging] Simplify Log Settings Initialization (#1394)
* Simplify logging loading

* Fix log injections and reduce verbosity
2021-06-13 18:06:43 -05:00
Akkadius
f3c85dc585 Auto convert insecure world server admin passwords during the world authentication process, add cli support for updating world admin account 2019-09-30 01:22:40 -05:00
Akkadius
11fdbb6a49 Add EscapeString to the one function left that is missing it 2019-09-17 00:37:55 -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
4498819fad Abstracted CLI command handling interface, streamlined more logging 2019-08-04 02:58:26 -05:00
Akkadius
ce09aad28a Move rest of logging to FMT and move config options into more finite categories 2019-07-14 22:16:26 -05:00
Akkadius
553d9aca6f Need more coffee apparently [skip ci] 2019-07-09 17:42:29 -05:00
Akkadius
910dfaf082 Typo fail [skip ci] 2019-07-09 17:41:08 -05:00
Akkadius
32e8a0fa45 Authenticate world admin prior to checking against a world short name [skip ci] 2019-07-09 17:39:06 -05:00
Akkadius
193dbe5938 Few tweaks [skip ci] 2019-07-09 17:22:11 -05:00
Akkadius
86943ce6be Add Database::DbLoginServerAdmin GetLoginServerAdmin [skip ci] 2019-07-09 16:57:14 -05:00
Akkadius
739f54bbfb Add CreateLoginserverWorldAdminAccount command [skip ci] 2019-07-09 05:23:21 -05:00
Akkadius
b165760f18 Update database [skip ci] 2019-07-09 04:02:13 -05:00
Akkadius
1a577014d9 Few more updates [skip ci] 2019-07-09 03:46:59 -05:00
Akkadius
0c2d26579a Update database.cpp 2019-07-09 02:14:41 -05:00
Akkadius
8eaeda5ec5 Tweaks 2019-07-09 02:10:10 -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
5473457c0c Migrate database schema 2019-07-07 05:26:10 -05:00
Akkadius
78d8b909be Add standalone web api server, cli handler, authorization, commands 2019-07-07 03:13:04 -05:00
Akkadius
0668f41de2 Fix some edge case with account name not being passed to world 2019-07-06 03:19:50 -05:00
Akkadius
a9969e500b ls tweaks 2019-07-05 21:22:35 -05:00
Akkadius
3eb102a006 Fix issue with adding the real values of new logging categories 2019-07-05 19:43:10 -05:00
Akkadius
b2ed5fe479 Add RFC 5424 logging 2019-07-05 18:16:09 -05:00
Akkadius
86f9a205e5 Remove eqemu_logsys_fmt.h header, more log tweaks 2019-07-05 17:20:20 -05:00
Akkadius
f0937c3963 More logging adjustments 2019-07-05 04:21:22 -05:00
Akkadius
ffd652a643 Load log settings from the database 2019-07-05 03:50:01 -05:00
Akkadius
b41e58fd10 More loginserver refactorings and cleanup 2019-07-05 02:33:31 -05:00
Akkadius
d5eb015533 Remove old DB connector 2019-07-04 23:29:54 -05:00
Akkadius
8ad4ef503b database_mysql -> database 2019-07-03 23:27:45 -05:00