--On Monday, November 14, 2005 11:55 AM -0500 Stan Bubrouski <[EMAIL PROTECTED]> wrote:
Yeah but limits are important. Allowing motd.txt to be infinite (limited to available memory) has no advantages really. And if your motd is more than a few thousand characters I seriouly doubt anyone is reading it anyways. If there were no motd.txt limit I'd link it to /dev/urandom and let all players that connected hang indefinately ;-)
motd.txt is essentially a web page. I don't know of any regular web servers that artificially limit the size of served pages. (Embedded web servers, yes, but they don't have the kind of non-volatile memory luxury of a box running HLDS.) Note that the size of the file isn't necessarily related to the extent of the rendered page. And webmasters can be as malicious as game server operators. ;) BTW, an important disadvantage of fixed-size buffers is that they tend to attract buffer overflow bugs and exploits. Only an assembly language programmer should use a fixed buffer, where performance absolutely demands it. (It might make sense when interacting with a hardware device with a fixed-size hardware buffer.) Using dynamically-sized buffers makes your code much more resistant to buffer-size-related bugs. One should also use smart pointers to avoid resource leaks. (String classes are really a special case of a smart pointer and a dynamically-assigned buffer.) _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux

