Commit graph

9 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
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +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 925aff21d4 Fix all the header guards and adjust the script a little 2018-07-06 16:11:38 +02: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