501 Commits

Author SHA1 Message Date
Chris Miles
78a9de124e
[Command] Fix #copycharacter command crash (#2446) 2022-09-25 13:00:25 -04:00
Chris Miles
89fdd842e1
[Code Cleanup] Zone Data Loading Refactor (#2388)
* [Code Cleanup] Zone data loading refactor

* Update client_packet.cpp

* strcpy adjustments

* Ensure safe points get reloaded properly

* Simplify GetPEQZone and getZoneShutDownDelay

* Bring in zone_store where needed

* Update client.cpp

* Signature

* Signature

* Convert helpers to using pointers

* PR comment

* Update worlddb.cpp

* Fix loading for instances

* Fix zoning with fallback as well

* Another place for instance fallback
2022-09-01 18:48:28 -05: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
Kinglykrab
7de50d0e60
[Bug Fix] Fix IP Exemptions. (#2189)
* [Bug Fix] Fix IP Exemptions.
- IP Exemptions were broken due to GetAccountID() returning 0 in logic somehow, resolved this by setting a variable to GetAccountID() at the beginning of the method.
- Fixed weird IP messages where the long form of IP was displayed instead of the string form.
- Fixes edge case where IP rule may be set to -1 and this will make anyone get instantly kicked if IP Exemptions were enabled as their IP Count would always be greater than -1.

* Update client.cpp

* Update client.cpp

* Update clientlist.cpp

* Update clientlist.cpp
2022-05-27 23:57:55 -04:00
Kinglykrab
275995a374
[Commands] Cleanup #zone and #zoneinstance Commands. (#2202)
* [Commands] Cleanup #zone and #zoneinstance Commands.
- Cleanup messages and logic.
- Broke these commands out in to their own files.

* Update database.cpp

* Update database.cpp

* Update database.cpp
2022-05-27 15:26:30 -04:00
Kinglykrab
e69f7a6cf1
[Commands] Remove unused/broken #deletegraveyard and #setgraveyard Commands. (#2198)
- These commands don't function in their current state, and they probably haven't ever.
- Removing the commands and putting this in an editor makes more sense, as #setgraveyard uses the current zone XYZ coordinates of a target to set a graveyard for another zone. and they also only allow version 0 graveyards.
- Not sure of a better idea than just deleting, as setting data based on another zone using your current zone's data seems beyond the scope of a command.
2022-05-23 19:56:30 -04:00
Kinglykrab
6398381c44
[Quest API] Add CheckNameFilter to Perl/Lua. (#2175)
- Add quest::checknamefilter(name) to Perl.
- Add eq.check_name_filter(name) to Lua.
- Allows operators to check strings against the name filter for stuff like setting custom pet names, titles, suffixes, etc in scripts.
2022-05-19 20:01:14 -04:00
Kinglykrab
d9c41526e8
[Commands] Cleanup #ban, #ipban, #flag, #kick, #setlsinfo, and #setpass Commands. (#2104)
* [Commands] Cleanup #ban, #ipban, #flag, and #kick Commands.
- Cleanup messages and logic.
- Add ServerFlagUpdate_Struct for flag updates.

* Add #setlsinfo and #setpass to cleanup.

* Update setlsinfo.cpp

* Update database.cpp

* Update database.cpp

* Update command.cpp
2022-05-07 23:28:45 -04:00
Kinglykrab
d59dcb68ca
[Commands] Add additional #peqzone functionality. (#2085)
* [Commands] Add additional #peqzone functionality.
- Add #peqzone flagging capabilities so operators don't have to blanket allow #peqzone access to zones.
- Allows you to set a zone's `peqzone` column to `2` and disallow use of `#peqzone` until they have been given the appropriate flag.
- Add #peqzone_flags command to list your #peqzone flags similar to #flags command.
- Add `character_peqzone_flags` table to database and database_schema.h.
- Required SQL update to add the new table.
- Add client:ClearPEQZoneFlag(zone_id) to Lua.
- Add client:HasPEQZoneFlag(zone_id) to Lua.
- Add client:LoadPEQZoneFlags() to Lua.
- Add client:LoadZoneFlags() to Lua.
- Add client:SendPEQZoneFlagInfo(client) to Lua.
- Add client:SetPEQZoneFlag(zone_id) to Lua.
- Add $client->ClearPEQZoneFlag(zone_id) to Perl.
- Add $client->HasPEQZoneFlag(zone_id) to Perl.
- Add $client->LoadPEQZoneFlags() to Perl.
- Add $client->SendPEQZoneFlagInfo(client) to Perl.
- Add $client->SetPEQZoneFlag(zone_id) to Perl.

* Fixes.
2022-05-01 19:39:52 -04:00
Paul Coene
2a5ddde78a
[Feature] Client Checksum Verification (Resubmit old 1678) (#1922)
* [Feature] Client Checksum Verification (Resubmit old 1678)

* Updated db version

* Add new updatechecksum to CmakeLists.txt

* Removed magic number and used constant

* Fix new command to have access to worldserver

* spacing, more venbose desc and remove unneeded check

* Cleanup, refactoring

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-03-06 20:26:29 -06:00
mmcgarvey
feed584a41
[Database] Escape reserved mysql keyword rank w/ backticks (#1862)
Fixes #1567
2021-12-14 13:57:35 -05:00
Kinglykrab
efab0c4b6b
[Quest API] Add remove LDoN Win/Loss to Perl and Lua. (#1611)
* [Quest API] Add remove LDoN Win/Loss to Perl and Lua.
- Add $client->RemoveLDoNLoss(theme_id) to Perl.
- Add $client->RemoveLDoNWin(theme_id) to Perl.
- Add quest::removeldonloss(theme_id) to Perl.
- Add quest::removeldonwin(theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonlossbyclientname(client_name, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbycharid(character_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbygroupid(group_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyraidid(raid_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyguildid(guild_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyexpeditionid(expedition_id, theme_id) to Perl.
- Add quest::crosszoneremoveldonwinbyclientname(client_name, theme_id) to Perl.
- Add quest::worldwideaddldonloss(theme_id, min_status, max_status) to Perl.
- Add quest::worldwideaddldonwin(theme_id, min_status, max_status) to Perl.
- Add client:RemoveLDoNLoss(theme_id) to Lua.
- Add client:RemoveLDoNWin(theme_id) to Lua.
- Add eq.remove_ldon_loss(theme_id) to Lua.
- Add eq.remove_ldon_win(theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_loss_by_client_name(client_name, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_char_id(character_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_group_id(group_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_raid_id(raid_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_guild_id(guild_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_expedition_id(expedition_id, theme_id) to Lua.
- Add eq.cross_zone_remove_ldon_win_by_client_name(client_name, theme_id) to Lua.
- Add eq.world_wide_add_ldon_loss(theme_id, min_status, max_status) to Lua.
- Add eq.world_wide_add_ldon_win(theme_id, min_status, max_status) to Lua.
Adds enum for LDoN Themes and Theme Bitmasks so we're not using magic numbers.
Adds item links to item messages and augment messages on rejection/restriction/Lore.

* Update client_packet.cpp

* Update client_packet.cpp

* Update servertalk.h

Alphabetical.
2021-10-20 15:11:14 -04:00
Kinglykrab
b3e9e2099a
[Quest API] Add GetIPExemption(), GetIPString(), and SetIPExemption(exemption_amount) to Perl/Lua.
- Add $client->GetIPExemption() to Perl.
- Add $client->GetIPString() to Perl.
- Add $client->SetIPExemption(exemption_amount) to Perl.
- Add client:GetIPExemption() to Lua.
- Add client:GetIPString() to Lua.
- Add client:SetIPExemption(exemption_amount) to Lua.

Will make plugin::IP unnecessary and allow people to get readable IP string easier, as well as set/get IP exemptions from Perl and Lua.
2021-10-02 13:39:32 -04:00
Chris Miles
94c1a50cc8
[GM Command] Door Manipulation Command Port (#1524)
* Initial commit

* Push latest

* Update door_manipulation.cpp

* More door work

* More doors work

* Upload notes

* Finalize changes

* Remove comment

* Add missing chat line

* Swapped URI parser with something not using deprecated C++ functions
2021-09-12 22:08:04 -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
Alex
00dd7c2b71
[Quest API] Add getcleannpcnamebyid(npc_id) to Perl/Lua. (#1383)
* [Quest API] Add optional clean name parameter to getnpcnamebyid in Perl/Lua.
- Allows Server Operators to grab the clean name without having to clean it up in their Perl/Lua.

* Convert from a parameter to a method.

* Add safer method.

* Convert to proper type.
2021-06-11 23:41:06 -05:00
Michael Cook (mackal)
4358e24dab
[Bug Fix] Fix use-after-free corruption with some DB calls (#1335) 2021-04-27 18:53:34 -05:00
Paul Coene
6fb687871c
Fix calls to GetSafePoints to not pass null_ptr as zonename (#1336)
* Fix calls to GetSafePoints to not pass null_ptr as zonename

* Fix GetSafePoints to check and deal will nullptr being sent as short_zone_name

* Remove unintentinal formatting change

* Fix some typos/cut-n-paste errors I assume

Co-authored-by: Noudess <noudess@gmail.com>
2021-04-27 17:21:37 -04:00
Alex
00fb9bc9f9
[Bug Fix] Zone Heading for Binds, Summons, Teleports, and Zoning. (#1328)
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.

With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.

This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.

The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()

Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()

SetStartZone parameter list was fixed also.

This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.

This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.

* Removed possible memory leaks.

* Fix SQL.

* Fix client message.

* Fix debug log.

* Fix log message.

* Fix call in rebind overload.

* Fix floats.

* Add default to column.
2021-04-22 22:49:44 -05:00
Michael Cook (mackal)
86ce506956
[Cleanup] Nuke Make/AppendAnyLenString (#1251)
* Add a std::string overload for Database::SetMQDetectionFlag

* Replace calls to MakeAnyLenString in client_packet.cpp

At least the SetMQDetectionFlag ones

* Replace MakeAnyLenString calls in client_process

At least SetMQDectectionFlag ones

* Replace MakeAnyLenString in embparser

fmtlib actually is gross here, oh well.

* Replace MakeAnyLenString in merc

* Replace MakeAnyLenString in inventory

Also if'd out an unfinished implementation of Client::GetItemLinkHash

* Replace AppendAnyLenString in zonelist

* Replace AppendAnyLenString in zonelist

* Replace MakeAnyLenString in clientlist

* Nuke MakeAnyLenString/AppendAnyLenString

* Fix formatting string in zonelist
2021-02-23 18:32:19 -06:00
Akkadius
2e0c892b07 Add cli character:copy-character and #copycharacter 2020-07-18 21:07:22 -05:00
Akkadius
331eb51126 Add connection label to MySQL connects 2020-07-07 02:06:00 -05:00
Akkadius
56c4eb280f Fix post merge issues 2020-05-23 22:41:59 -05:00
Akkadius
3f62da4573 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-23 22:33:34 -05:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
Akkadius
373fb3f0e7 Decouple zone calls, cleanup logic 2020-04-19 04:36:39 -05:00
Akkadius
3daf03c796 Remove errant cout [skip ci] 2020-04-11 05:57:31 -05:00
Akkadius
5b4c4bfd66 Implement content flags 2020-04-11 05:48:41 -05:00
Akkadius
2b1b786f02 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-06 02:55:46 -05:00
Alex
02cac686b6 Add getnpcnamebyid(npc_id) to Perl/Lua. 2020-04-06 00:10:58 -04:00
Alex
ae959be5ac Added getcharnamebyid(char_id) to Perl/Lua. 2020-04-05 21:18:05 -04:00
Akkadius
dae20afcba Fix character creation tenancy operations 2020-03-31 01:49:42 -05:00
Akkadius
c98d2743c5 Migrate doors [skip ci] 2020-03-11 03:20:38 -05:00
Alex
cede38f562 Add GetRaidIDByCharID to Perl/Lua. 2020-03-08 21:11:56 -04:00
Alex
2a9248697e Add GetGroupIDByCharID and GetGuildIDByCharID to Perl/Lua. 2020-03-08 20:49:01 -04:00
Alex
46ff09f438
Merge pull request #962 from noudess/patch-8
Implement DefaultGuild Rule
2020-02-05 13:05:07 -05:00
Paul Coene
b4f42c150f
Update database.cpp
Change variable_name and use LastInsertedID() to remove unneeded call.
2020-02-05 12:31:29 -05:00
Akkadius
861b879a94 Add GetCharacterTables() with table - key pair. Use in character hard deletes https://gist.github.com/Akkadius/f10e3757a0b52b971076643eccf9c5d0 2020-02-05 01:34:29 -06:00
Paul Coene
f9b3b7aecf
Implement DefaultGuild rule 2020-02-03 12:54:26 -05:00
Akkadius
c82d08cf11 Make sure character soft deletes do not reserve name once deleted, add optional retro script to run for servers who had soft deletes running prior to this commit 2020-01-26 16:31:15 -06:00
Akkadius
d1fb74ff5f Fix bot table 2020-01-10 02:59:52 -06:00
Akkadius
b9e87abb3c Implement Character Soft Deletes 2020-01-10 02:54:29 -06:00
Akkadius
f9e822072f AE Scanning adjustments, testing 2019-12-28 17:08:34 -06:00
Akkadius
80d8736276 Merge branch 'master' of https://github.com/EQEmu/Server into feature/world-cli-handler 2019-12-24 03:00:48 -06:00
Akkadius
20538e91a1 Adjust usages for banned_ips table to reflect Uleat's changes 2019-12-24 02:59:58 -06:00
Akkadius
4b69f56a65 Update command handler to use actual real arguments 2019-12-23 01:31:39 -06:00
Uleat
8f3689e023 Revert "Added auto-correcting code to logsys category descriptions (thanks kentaiVZ!)"
This reverts commit 7de655ba769f2e5c1b27d1ab609d2fbdb8f25ac2.
2019-11-09 19:08:57 -05:00
Uleat
7de655ba76 Added auto-correcting code to logsys category descriptions (thanks kentaiVZ!) 2019-11-08 22:36:40 -05:00
kentai
62be0c475e Added backticks on sql keyword 2019-10-24 02:44:57 +11:00
Akkadius
1acb76bc74 More Logs::None to LogDebug 2019-09-02 03:18:12 -05:00