summaryrefslogtreecommitdiff
path: root/src/session.cpp
Commit message (Collapse)AuthorAgeFilesLines
* v1, sigabrt on client disconnectlittleblack1112025-06-071-14/+36
|
* fix(3c94a88ec7419e9d0c83c99883c4a0b010a97614): logic error in read(bypassDeaf)littleblack1112025-06-021-1/+1
| | | | | previously, m_bDeaf was cached, now it's not and directly read note: previously, the second deaf check was unncessary
* Revert "style: clang-tidy"littleblack1112025-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit aa84ff9d0cd2b31cda6e6b55b4f36cec7e61eec0. not sure why.. ``` src/session.cpp:105:19: error: no matching function for call to ‘std::__cxx11::basic_string<char>::erase(std::ranges::borrowed_subrange_t<std::__cxx11::basic_string<char>&>, std::__cxx11::basic_string<char>::iterator)’ 105 | data.erase(std::ranges::remove(data, asciiEscape), data.end()); // don't accept ASCII code, might mess up terminal | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/session.cpp:105:19: note: there are 3 candidates In file included from /usr/include/c++/15.1.1/string:56, from /usr/include/c++/15.1.1/bits/locale_classes.h:42, from /usr/include/c++/15.1.1/bits/ios_base.h:43, from /usr/include/c++/15.1.1/ios:46, from /usr/include/c++/15.1.1/bits/ostream.h:43, from /usr/include/c++/15.1.1/bits/unique_ptr.h:43, from /usr/include/c++/15.1.1/memory:80, from src/chatManager.hpp:3, from src/session.hpp:4, from src/session.cpp:1: /usr/include/c++/15.1.1/bits/basic_string.h:2323:7: note: candidate 1: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::erase(size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ 2323 | erase(size_type __pos = 0, size_type __n = npos) | ^~~~~ /usr/include/c++/15.1.1/bits/basic_string.h:2323:23: note: no known conversion for argument 1 from ‘std::ranges::borrowed_subrange_t<std::__cxx11::basic_string<char>&>’ to ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} 2323 | erase(size_type __pos = 0, size_type __n = npos) | ~~~~~~~~~~^~~~~~~~~ /usr/include/c++/15.1.1/bits/basic_string.h:2343:7: note: candidate 2: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::erase(__const_iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]’ 2343 | erase(__const_iterator __position) | ^~~~~ /usr/include/c++/15.1.1/bits/basic_string.h:2343:7: note: candidate expects 1 argument, 2 provided /usr/include/c++/15.1.1/bits/basic_string.h:2363:7: note: candidate 3: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::erase(__const_iterator, __const_iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; iterator = std::__cxx11::basic_string<char>::iterator; __const_iterator = std::__cxx11::basic_string<char>::const_iterator]’ 2363 | erase(__const_iterator __first, __const_iterator __last) | ^~~~~ /usr/include/c++/15.1.1/bits/basic_string.h:2363:30: note: no known conversion for argument 1 from ‘std::ranges::borrowed_subrange_t<std::__cxx11::basic_string<char>&>’ to ‘std::__cxx11::basic_string<char>::__const_iterator’ {aka ‘std::__cxx11::basic_string<char>::const_iterator’} 2363 | erase(__const_iterator __first, __const_iterator __last) | ~~~~~~~~~~~~~~~~~^~~~~~~ make: *** [Makefile:73: build/session.o] Error 1 make: *** Waiting for unfinished jobs.... ```
* style: clang-tidygithub-actions[bot]2025-05-311-1/+1
|
* internal: all CFileDescriptor is now wrapped in shared_ptrlittleblack1112025-05-311-6/+7
| | | | | shared_ptr operations are atomic good for multi threading
* style: remove unncessary Hyprutils::OS NSlittleblack1112025-05-311-1/+1
|
* style: clang-formatgithub-actions[bot]2025-05-301-1/+1
|
* perf(session): directly use m_bDeaflittleblack1112025-05-301-14/+13
|
* style: clang-formatgithub-actions[bot]2025-05-271-1/+1
|
* fix: don't accept ascii seq(0x1B)littleblack1112025-05-271-1/+3
| | | | | | this can mess up terminals of others won't really affect the server as we using ftxui and it seems to not affect the output somehow
* fix(1af5ffbfc646ccd116f1131f27bae3843eef406d): typo in comparisonlittleblack1112025-05-271-1/+1
| | | | msg.msg -> msg.username
* session(newMessaeg): specify .sender = thislittleblack1112025-05-271-1/+1
| | | | | fix bug in 4c23d3224d1820e72f072b2e4017c963a5c40fcb where no .sender specified will dupe
* session(write): write then restore readinglittleblack1112025-05-211-4/+6
|
* internal(session write): reuse the other write function as function overloadlittleblack1112025-05-211-12/+1
|
* feat: non-admin commandslittleblack1112025-05-211-2/+6
|
* internal: prefer direct pointers instead of (uintptr_t) converted oneslittleblack1112025-05-211-1/+1
|
* feat: join and leave messagelittleblack1112025-05-211-1/+5
| | | | | internal: refactored messaging management, use instnace pointer for verification of session
* Revert "internal: use smart pointer for everything, no more naked pointer"littleblack1112025-05-201-3/+3
| | | | | | This reverts commit 72cf95bc9b1eb338457a0815eb1fe4f70b42ebb3. segfault/IOT instruct on client exit...
* internal: use uintptr_t of session instance for identificationlittleblack1112025-05-201-1/+1
|
* perf(session): unecessary init of m_addrLenlittleblack1112025-04-121-2/+1
|
* internal: use smart pointer for everything, no more naked pointerlittleblack1112025-04-071-3/+3
|
* internal(session::writeChat): also be bool, returns write()'s boollittleblack1112025-04-071-3/+4
|
* session: use std::string for m_ip instead of c charlittleblack1112025-04-071-3/+5
|
* style: clang-formatgithub-actions[bot]2025-04-071-2/+4
|
* refactor: loggingslittleblack1112025-04-071-4/+9
|
* fix(session): strerrno thread safetylittleblack1112025-04-071-1/+5
|
* feat: deaflittleblack1112025-04-031-4/+25
| | | | necessary for being deaf during registeration
* feat: ability to mute/unmute clients (#12)littleblack1112025-03-221-0/+8
|
* fix: broken pipe sometimeslittleblack1112025-03-221-1/+1
|
* feat(commands): client execute commands (#8)littleblack1112025-03-221-3/+19
| | | | refactor(session): writeChat, unify written chat internal: removed `CChatManager::broadcastMessage`, just use `g_pSessionManager->broadcastChat(msg)`
* feat(session): getIplittleblack1112025-03-211-0/+4
|
* clang-formatlittleblack1112025-03-211-2/+2
|
* session(SRecvData): use false as defaultlittleblack1112025-03-211-1/+3
| | | | | so if something was wrong(the function directly returned or smth, it'd be good = false)
* perf: directly kick instead of calling function in the session(killing it's ↵littleblack1112025-03-211-7/+1
| | | | self?)
* feat: kick client (#6)littleblack1112025-03-201-8/+7
|
* debug: only run hooks that is for debug purposes in debug buildslittleblack1112025-03-201-6/+20
| | | | log: only log TRACE in debug builds
* cleanup: explicit const and return original instead of dupe for perflittleblack1112025-03-201-1/+1
|
* clang-format & clang-tidylittleblack1112025-03-201-10/+10
|
* session(SRecvData::data): use std::string instead of char*littleblack1112025-03-201-16/+25
|
* fix: NONEWLINE more explicitlittleblack1112025-03-201-2/+16
| | | | | | fixes a problem where all of socket wrote response is using NONE fmt(944b18bde52778b32c31dc23f3d90fc17b94794f) so all of them don't have \n
* perf(session): use pointer for SRecvDatalittleblack1112025-03-201-17/+27
|
* feat(session): resume history for new client or rejoinlittleblack1112025-03-201-1/+7
|
* NFormatter: no more prefix support for socket writelittleblack1112025-03-201-8/+8
| | | | NFormatter: remove CHAT prefix
* session: read also include name of selflittleblack1112025-03-201-1/+1
|
* cleanup(session): unnecessary scope(eFormatType)littleblack1112025-03-201-2/+2
|
* clang-tidylittleblack1112025-03-201-6/+5
|
* session(write): fix newline not being printed before writelittleblack1112025-03-201-0/+4
| | | rn if you write() while there is a read("text") it would output the new write() in the same line which is not ideal.
* bump: compile_commandslittleblack1112025-03-201-6/+7
|
* session: get/use IP and port on connectlittleblack1112025-03-201-4/+10
|
* clang-formatlittleblack1112025-03-201-19/+17
|