I have been getting multiple private messages about players crashing servers by feeding invalid string tokens in to the local / faction / admin chat: this is not a bug caused by anything in PW, just a result of the M&B module system string composition functionality not being coded robustly, to handle errors gracefully when fed invalid strings rather than crashing the whole game engine. Since the module system has no operations for recognising characters or processing strings (except for str_is_empty, which is no use) there is no way to prevent the crash other than entirely removing local, faction, and admin chat from the mod.
As I have said in the past when people asked about it, there doesn't seem much chance of TaleWorlds fixing the bug, since Warband Native multiplayer is not affected (text strings from non admin player input are not sent to the server, for display or logging - the hard coded global and team chat do not use the module system, and exploits affecting them in the past were fixed in the engine code), and the game seems well past maintenance mode, abandoned except when external developers pay for features for "child" games (fair enough).
The best chance of dealing with the problem at the moment is using the WSE or something like it. Since people don't seem to be figuring it out themselves (or at least sharing with everyone), I have updated the "merge_wse" branch in GitHub to WSE v4.2.9 and have done some testing to see what could be done to prevent the crashing: the str_sanitize operation seems made for the purpose, and when added to the client_event_chat_message_* event handler in script_game_receive_network_message, the crashes seemed to stop for me (the sending player still crashes, but who cares). The script changes are very simple - could be one line if you wanted:
https://github.com/vornne/pw_module_system/commit/a03c3b328770fdad35158d1bccc0ceb0467b076a
Or if using the PW git repository for your server script changes, just fetch and merge the merge_wse branch, then build the module, and use the WSE to run your dedicated server.
As I have said in the past when people asked about it, there doesn't seem much chance of TaleWorlds fixing the bug, since Warband Native multiplayer is not affected (text strings from non admin player input are not sent to the server, for display or logging - the hard coded global and team chat do not use the module system, and exploits affecting them in the past were fixed in the engine code), and the game seems well past maintenance mode, abandoned except when external developers pay for features for "child" games (fair enough).
The best chance of dealing with the problem at the moment is using the WSE or something like it. Since people don't seem to be figuring it out themselves (or at least sharing with everyone), I have updated the "merge_wse" branch in GitHub to WSE v4.2.9 and have done some testing to see what could be done to prevent the crashing: the str_sanitize operation seems made for the purpose, and when added to the client_event_chat_message_* event handler in script_game_receive_network_message, the crashes seemed to stop for me (the sending player still crashes, but who cares). The script changes are very simple - could be one line if you wanted:
https://github.com/vornne/pw_module_system/commit/a03c3b328770fdad35158d1bccc0ceb0467b076a
Or if using the PW git repository for your server script changes, just fetch and merge the merge_wse branch, then build the module, and use the WSE to run your dedicated server.