40 Commits

Author SHA1 Message Date
Kinglykrab
5470ec6293
[Commands] Cleanup #corpse Command. (#1790)
- Cleanup message and logic.
- Add ConvertMoneyToString(platinum, gold, silver, copper) helper method.
- Cleanup NPC::QueryLoot() and Corpse::QueryLoot().
2021-11-21 14:02:03 -05:00
Kinglykrab
40edefa6f4
[Commands] Cleanup #camerashake Command. (#1787)
- Cleanup message and logic.
- Fix ConvertSecondsToTime logic for milliseconds.
- Add ConvertMillisecondsToTime inline function.
2021-11-21 10:03:20 -05:00
Kinglykrab
ddcb184183
[Commands] Cleanup #stun Command. (#1749)
* [Commands] Cleanup #stun Command.
- Cleanup message.
- Add ConvertSecondsToTime() to string_util.h and convert Quest API Methods to use helper.

* Add days to ConvertSecondsToTime() and cleanup logic.

* Cleanup.

* Typo.

* Cleanup.

* Cleanup.
2021-11-14 14:05:44 -05:00
Chris Miles
a9d1034298
[Loginserver] Worldserver Name Sanitization (#1739)
* Sanitize bad words in server names

* Add config options and enforcement for dev/test servers and servers starting with a special character

* Refine bad word logic

* Add installer to dev/test servers

* Change server prefixes

* Special char prefix

* Formatting

* Remove multi words

* Add server types enum

* Add error constants

* Remove sanitize from world level

* Use strn0cpy
2021-11-12 23:02:05 -06: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
c078257f70
[Quest API] Port DiaWind Plugin to Native Quest API (#1521)
* Port DiaWind plugin to native Quest API

* Add no logging aliases
2021-09-05 20:29:21 -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)
dba3010c89
[Strings] Split String Optimizations (#1325)
* Switch the 2 split calls to SplitString

* Nuke duplicate split in favor of SplitString #1263

* Add a test for SplitString

* Optimize SplitString

Benchmarking:
--------------------------------------------------------------
Benchmark                       Time           CPU Iterations
--------------------------------------------------------------
bench_oldsplit               5201 ns       5201 ns     129500
bench_split                  1269 ns       1269 ns     548906

This is splitting a VERY long SpecialAbilities string. This is ~75%
speed up.
2021-04-22 23:36:39 -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
Michael Cook (mackal)
74ce20b256
Add string util search_deliminated_string (#1260)
This function takes a string of deliminated an see if another string is
one of those

This function also verifies it's not finding a substring
2021-02-23 11:52:34 -06:00
hg
da067be2fa Implement initial expedition system
Add Expeditions logging category

Add handlers for all Dynamic Zone/Expedition related opcodes

Add FormatName string_util function to format character names

Add Zone::IsZone helper method

Add cross zone MessageString support with variable parameters

Add static Client method helpers for cross zone messaging

Add #dz gm command to debug expedition cache for current zone
2020-12-30 18:47:06 -05:00
Akkadius
2e0c892b07 Add cli character:copy-character and #copycharacter 2020-07-18 21:07:22 -05:00
Noudess
4a23086183 Fixes to #grid show. Added new string utilities. 2020-05-28 08:41:10 -04:00
Akkadius
69d887b421 Use something a little more compatibility friendly 2020-01-01 20:47:58 -06:00
Uleat
e7ad57a37e Resistance is futile! 2020-01-01 21:12:09 -05:00
Uleat
d50e5855c4 There, there windows..it'll be ok... 2020-01-01 20:57:42 -05:00
Akkadius
689493610f Make windows happy? 2020-01-01 19:16:33 -06:00
Akkadius
406b193206 Cleanup Perl logging and streamline formatting, tie errors to main Quests logging category live output, add string utils 2020-01-01 19:04:11 -06:00
Uleat
cf80e594bc Merge branch 'master' of https://github.com/EQEmu/Server into lsid
# Conflicts:
#	common/ruletypes.h
#	world/net.cpp
#	zone/bot_command.cpp
#	zone/command.cpp
#	zone/zonedb.cpp
2019-09-12 01:54:37 -04:00
Uleat
fcaa685e77 Hack fix for differences in Windows-Linux template generation techniques 2019-09-05 23:00:46 -04:00
Uleat
f9536f9621 Updated the rule system to automatically add new rules and remove orphaned entries from the rule values tables 2019-09-03 04:04:05 -04:00
Akkadius
db5e511af3 Merge branch 'master' of https://github.com/EQEmu/Server into lsid 2019-09-01 19:23:56 -05:00
Uleat
a534ab83ec Converted new implode and join_pair functions to template functions 2019-08-31 20:55:46 -04:00
Uleat
d341a1b38f Updated the command systems to automatically add new commands and remove orphaned entries from the command settings tables 2019-08-30 06:38:48 -04:00
Akkadius
1c6a76246f Added bulk edit command #npceditmass <column-to-search> <column-search-value> <change-column> <change-value> 2019-08-11 02:40:23 -05:00
Akkadius
57354579aa Unify chat constants usage 2019-08-11 00:00:55 -05:00
Akkadius
8bb909090b Merge branch 'master' into lsid 2019-06-26 00:56:13 -05:00
Akkadius
4758c04e99 More mob_info work 2018-11-13 03:07:18 -06:00
Akkadius
775b5fcaf1 Mostly done with global base scaling work, dev tooling and various other works 2018-11-04 23:26:34 -06:00
KimLS
0ec53eff52 Reimplement some functions 2017-12-24 23:21:17 -08:00
KimLS
18d28ae8d3 Console initial implementation 2017-04-09 20:17:48 -07:00
Uleat
a37a811014 Imported memory_buffer files from inv2 branch 2016-05-27 20:39:11 -04:00
Uleat
ffb88e0a8f Added EQEmu::OutBuffer() - stringstream-derived class with a few additional methods 2016-05-18 22:38:41 -04:00
Akkadius
20c99e36d8 find_replace fix 2015-02-01 22:29:04 -06:00
Akkadius
4f4eee2b16 Re-Order string_util.h 2015-02-01 01:03:30 -06:00
Akkadius
ed9bdaf60c Add to string_util.h void find_replace(std::string& string_subject, std::string& search_string, std::string& replace_string) { 2015-02-01 01:00:05 -06:00
Akkadius
ef3d4ae51a string_util linux build fix 2014-12-15 22:56:29 -06:00
Akkadius
40377447ac string_util.cpp & .h header include cleanup 2014-12-15 22:47:48 -06:00
KimLS
412835d7fa Basic string tests, plus fix for StringFormat returning a std::string that was just very subtley malformed. 2014-08-24 16:26:51 -07:00
KimLS
7fc21b9e3a Tons of renames 2014-08-21 19:33:02 -07:00