diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2022-07-30 19:42:22 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 18:42:22 +0200 |
| commit | 7b88d4be954b415e069ee0d612e4df3793c61756 (patch) | |
| tree | eb8b93c10d369c0d0c5d6629e61dc661a0863481 /include | |
| parent | cf91cc03f849bba498cd8d91505bf8db04f8b1f9 (diff) | |
Never send an unencoded packet to the server (#719)
* never send an unencoded packet to the server
* oops
* Improve packet validation to remove segfaults
* WARNING: commit breaks connecting to servers, need help
start fixing omniwhy caused by single fuckin string packets (AAAAAAAAAAAAAAAAA)
* Fix failed connections to servers (Thanks to @Iuvee for helping me figure this out!)
* Fix demoserver
* who the fuck still uses goto
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* ANOTHER GOTO????
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* braces
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* good bot Update src/packet_distribution.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix demoserver harder
* Improve demo logging
* Fix memory leakage by deleting the packet
Fix useless demoserver wait packet creation when none of that packet is used
Co-authored-by: stonedDiscord <Tukz@gmx.de>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoapplication.h | 2 | ||||
| -rw-r--r-- | include/aopacket.h | 4 | ||||
| -rw-r--r-- | include/demoserver.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h index ce74215..21c04b8 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -78,7 +78,7 @@ public: void server_packet_received(AOPacket *p_packet); - void send_server_packet(AOPacket *p_packet, bool encoded = true); + void send_server_packet(AOPacket *p_packet); void call_settings_menu(); void call_announce_menu(Courtroom *court); diff --git a/include/aopacket.h b/include/aopacket.h index a325103..d5baccb 100644 --- a/include/aopacket.h +++ b/include/aopacket.h @@ -7,8 +7,8 @@ class AOPacket { public: - AOPacket(QString p_packet_string); - AOPacket(QString header, QStringList &p_contents) : m_header(header), m_contents(p_contents){} + AOPacket(QString header) : m_header(header){} + AOPacket(QString header, QStringList p_contents) : m_header(header), m_contents(p_contents){} QString get_header() { return m_header; } QStringList &get_contents() { return m_contents; } diff --git a/include/demoserver.h b/include/demoserver.h index d355ddb..bb0baed 100644 --- a/include/demoserver.h +++ b/include/demoserver.h @@ -23,7 +23,7 @@ public: int max_wait = -1; private: - void handle_packet(AOPacket packet); + void handle_packet(AOPacket *packet); void load_demo(QString filename); void reset_state(); |
