Commit graph

7 commits

Author SHA1 Message Date
Robert Müller 8156052cc1 Refactor name bans, move code to separate class CNameBans
Unify all code for name bans in new class `CNameBans` in the existing `name_ban.cpp/h` files. The previously global function `IsNameBanned` is now the member function `CNameBans::IsBanned`. The existing name ban tests are extended for the `CNameBans` class.

Move `CNameBan` constructor definition to source file to avoid including `system.h` in the header file. Use `bool` instead of `int` for `m_IsSubstring`. Reorder `CNameBan` constructor arguments and remove unnecessary default value.
2023-11-25 22:28:54 +01:00
Alexander Akulich 6d9284adc1 Port some code to str_copy() template 2022-07-09 19:40:58 +03:00
Robert Müller c6e195a399 Use std::vector<CNameBan> instead of array 2022-05-27 16:31:18 +02:00
Dennis Felsing 843acf6a5a Use std::size instead of sizeof(a) / sizeof(a[0]) 2022-03-30 18:55:04 +02:00
12pm 3dcb83778f Make name more descriptive 2019-03-11 14:48:45 +01:00
12pm 29592afdb5 Add exact name ban option 2019-03-03 18:29:33 +01:00
heinrich5991 11304661db Put name ban stuff into a separate file
Fix a bug when overlong names could be used to circumvent name bans. Add
tests for name bans.
2018-03-14 02:35:31 +01:00