Commit Graph

36 Commits

Author SHA1 Message Date
Leifa♥
f307f728c9 Added command extension system (#12)
* Added command extension system

Resolve #10

* Added akashi definitions

* Updated headers to comply to the standard

* Added full definition to argument

* Clang-format pass

* Missing header for GCC

* Missing header for GCC

* Move method implementation to source file
2022-06-15 17:52:27 -05:00
Leifa♥
657a47b029 Added flexible ACL roles (#7)
Resolve #4
2022-06-15 17:52:27 -05:00
Leifa♥
b0555207d6 Privatization rework (#2)
* Add clang-format

* Multiple privatization changes

"Participation handshake" this refers to the moment that the user's client sends the `askchaa` packet.

* Server::m_clients is now private. Get a copy with Server::getClients()
* Server::m_player_count is now private. Get a copy with Server::getPlayerCount() (Additional logic was added to handle the player count.)
* AOClient::m_joined is now private. Get a copy with AOClient::hasJoined()
* Added signal AOClient::joined(); will be emitted when the client first complete the participation handshake.
* Renamed Server::updatePlayerCount to Server::playerCountUpdated

* Privatized Server

* Made Server members private: m_characters, m_areas, m_area_names
* Added Server methods: getCharacters(), getAreas(), getAreaById(f_area_id), getAreaByName(f_area_name), getAreaNames(), getAreaName(f_area_id), getMusicList
* Added Server helper methods: getCharacterCount(), getAreaCount()
- This reduce code repetition of the following example: server->getCharacters().length(), server->getAreas().size()

* Solved other merge conflicts

* Added Server methods, various fixes

* Added Server methods: getCharacterById(f_chr_id)
* Various optimizations

* More Server privatization changes

* Made Server members private: db_manager, next_message_timer, can_send_ic_messages
* Renamed Server members:
  * next_message_timer -> m_message_floodguard_timer
  * can_send_ic_message -> m_can_send_ic_message
Added Server methods: getDatabaseManager, isMessageAllowed, startMessageFloodguard(f_duration)
Made Server methods private: allowMessage

* Added new fields to load for AreaData

* Added fields: `area_message` (default: empty string) and `send_area_message_on_join` (default: false)

* Added Server::clearAreaMessage

* Cleaned up headers include (AOPacket excluded)

* Removed most project file includes, moved to source file (cpp)
  * AOPacket was excluded because some methods modify the copy

* Fix compile error when using MingW compiler

* Appease clang by using proper or and putting it in parentheses
* Remove extra semicolon
2022-06-15 17:52:27 -05:00
AwesomeAim
a4f93033ac Correct loadCommandHelp variable names, return if too many arguments on help, and add behaviour if no help exists 2022-03-20 21:20:47 -07:00
Salanto
de3680eb87 Add backwards compatability with older config folders
Prevents an oopsie where logs are non-functional when the config folder was not updated yet.
Also, it's reloadable. How neat is that?
2021-12-17 02:42:54 +01:00
Salanto
ae190311bd Reload the list so that vile people shall no longer enter 2021-11-14 13:28:37 +01:00
Salanto
18281ae401 Implement clearcm command 2021-09-19 17:00:14 +02:00
Salanto
970b0975b4 Add command to retrieve help information
+ Rename old help that displays available commands to commands
+ Layout basic helpfile
2021-09-15 20:27:05 +02:00
Salanto
3f212aeb35 Add reload capability for the musiclist 2021-09-13 15:29:25 +02:00
Salanto
f523fc6ec0 AOClient madness 2021-09-11 19:46:40 +02:00
Salanto
a4e8442657 Cleanup some variable naming
+ move file reading operations into ConfigManager
2021-09-10 23:33:37 +02:00
Salanto
70a63dd8b3 emit most log slots from AOClient
- Still need to figure out how login handles it
2021-08-25 05:34:16 +02:00
Rosemary Witchaven
624fe41e12
Fix or suppress compiler warnings (#158)
* purge warnings

* indentation change

* unused macros for notice cmd

* cleanup clazy/clang-tidy diagnostics
2021-08-23 19:07:22 -05:00
Salanto
9148e522aa Make webhook reloadable 2021-08-12 21:44:53 +02:00
in1tiate
c6b0c5f6de move notice functionality to helper function 2021-08-10 00:28:36 -05:00
in1tiate
7b1845aa8d add global version of/notice 2021-08-04 06:12:25 -05:00
in1tiate
e60f18554b add notice box command for moderators to get attention quickly 2021-08-04 05:30:22 -05:00
scatterflower
af353b942e
Merge pull request #164 from Salanto/Ban-Webhook
Implement ban webhook
2021-08-02 16:53:15 -05:00
Salanto
9e824e1256 Implement Webhook for Ban Information
Co-Authored-By: Rose Witchaven <32779090+in1tiate@users.noreply.github.com>
2021-08-02 23:49:37 +02:00
Salanto
2f92ca99f4 Correct configuration update oversight during config reload for the modern advertiser
Corrects oversight that causes ports to be reloaded in case they change in the config. Since Akashi cannot change its port mid-operation, that information needs to be excluded during a reload.
2021-08-02 00:38:31 +02:00
Salanto
13cd901cfc Use struct to transport config
+ Fix debug message on success
2021-07-11 20:15:04 +02:00
Salanto
8994ba2626 Implement new advertiser
I want to die.
2021-07-08 23:18:49 +02:00
MangosArentLiterature
1e20ab0ae6 Merge branch 'master' into remote-bans 2021-06-21 22:07:30 -05:00
scatterflower
86e8d4dd7b
Merge pull request #141 from AttorneyOnline/fix-ban-crash
Fix crash with /ban
2021-06-21 21:45:53 -05:00
MangosArentLiterature
0e6efb18c0 Use QSettings instead of settings struct
As it turns out, I am not intelligent.
2021-06-19 23:05:33 -05:00
MangosArentLiterature
c4db245bec Rewrite ConfigManager and server configs
- Rewrites ConfigManager
- Adds DataTypes
- Changes "auth" and "logging" to use new AuthType and LogType types.
- ConfigManager now handles all config loading
- Remove AreaData and Server config.ini and command config loading.
2021-06-18 18:06:32 -05:00
MangosArentLiterature
da7aa12b90 Fix crash with /ban
Sets /ban to require 3 arguments instead of 2
2021-06-14 11:24:18 -05:00
MangosArentLiterature
555b4a0cbf Implement remote banning
- Use IPID for IP bans instead of remote IP.
- Remove 2 extraneous DB queries by altering isIPBanned()
- Allow banning unconnected clients
2021-06-09 23:15:06 -05:00
MangosArentLiterature
6cf9f2dd23 Merge branch 'master' into ban-updating 2021-06-03 11:44:07 -05:00
MangosArentLiterature
17ab971e85 Fix command UID crash
Fix several commands targeting clients by UID crashing the server by not properly checking if the client they want exists.
2021-05-31 20:50:46 -05:00
Cerapter
e6b00575d8 Merge remote-tracking branch 'refs/remotes/scatter/master' 2021-05-13 07:15:18 +02:00
Cerapter
ba3d20186d Merge remote-tracking branch 'refs/remotes/scatter/master'
Conflicts:
	akashi.pro
	core/src/aoclient.cpp
	core/src/commands/authentication.cpp
	core/src/packets.cpp
	src/aoclient.cpp
	src/commands/authentication.cpp
	src/packets.cpp
2021-05-09 15:11:02 +02:00
Cerapter
08fd5896ba More work on AreaData rework 2021-05-01 17:45:59 +02:00
Cerapter
85cc9af73a Change all accesses to getters 2021-05-01 16:05:50 +02:00
Cerapter
5a0c291825 AreaData acccess rework, from direct to through getters
Literal hell.
2021-05-01 15:29:58 +02:00
Cerapter
f5cc137b40 Rename lib to core.
On Linux, the resulting shared library would have been called `liblib`, which is just dumb.
2021-04-26 21:14:25 +02:00