Just an FYI, I wasn't trying to insinuate that you were copying code. I was responding to Dale's comment about ROM Derivitives with my take on how it is interpreted. If you continued and read my second paragraph you'd see that my opinion would be supporting what you say below, specifically: "there's only so many ways to send data in a loop to someone". I fully agree with that statement. :P
Now, I haven't looked much at the code you posted, but it sounds like your leaking memory somewhere. Whenever data members start shifting owners (names going into the room description, prompts turning into mob names etc..) you'll find most of the time the game is leaking. Tracking that leak down is the hard part because it could be coming from anywhere. Here is a link to memory testing software that I've been told works well (I haven't used it yet though I'm planning on it because I've had some small mem-leaks that have been around for a while). http://www.linkdata.se/sourcecode.html Rhien. -----Original Message----- From: Mark Roberts [mailto:[EMAIL PROTECTED] Sent: Friday, May 16, 2003 12:56 PM To: Pell, Blake Cc: [email protected] Subject: Re: Requesting help On Friday 16 May 2003 11:58, Pell, Blake wrote: >If you are looking, then re-typing the code it might as well be copying >code at which point I'd think it violates the ROM license if you're making >your own source. Oh my god, I've had to bite back sooo many biting retorts. So, I'll just let the code speak for itself. I'll let the list tell me if I have a ROM derivative or not... (but really, honestly, I see no way that I can stop it from being a ROM derivative if you call it one - there's only so many ways to send data in a loop to someone!!) Really though, of 926 lines of code (real code, non-blank or comment), 917 are completely unique. (Or... they better be!) // Snip. const char color_ident[16] = { 'x', 'r', 'g', 'y', 'b', 'm', 'c', 'w', 'd', 'R', 'G', 'Y', 'B', 'M', 'C', 'W' }; const char * colors[16] = { "\e[0m", "\e[0;31m", "\e[0;32m", "\e0;33m", "\e[0;34m", "\e[0;35m", "\e[0;36m", "\e0;37m", "\e[1;30m", "\e[1;31m", "\e[1;32m", "\e[1;33m", "\e[1;34m", "\e[1;35m", "\e[1;36m", "\e[1;37m" }; void telnet_server::write_to_descriptor(descriptor * d) { if (serverdown) return; string str; char input[8192], txt[8192]; int start, write, block, x, length; str=d->get_outbuf(); if (str == "") return; *input=0; strcpy(input, str.c_str()); length=strlen(input); *txt=0; for (start=block=0; start < length; start++) { if (input[start] == '{') { if (input[start+1] == color_ident[x]) { strncat(txt, input+block, start-block); strcat(txt, colors[x]); block=start+2; break; } } } strncat(txt, input+block, start-block); x=d->get_socket(); length=strlen(txt); for(start=0; start < length; start+=write) { block=(length-start < 4096)?length-start:4096; if ((write=send(x, txt+start, block, 0)) < 0) { perror("write_to_descriptor() failed"); return; } } } // End snip I will note, however, that your issue of whether or not it's a ROM derivative is... utterly unimportant. I posted to find out if I can enlist the aid of someone with skill. Because I'm at my wit's end.. I cannot figure out why once everyone logs out of the mud, and someone logs back in, the mud crashes on the first command they type, and their pretitle is mystically "You're all set!" and their name is my room description!! Oh. Noteworthy: a clean compile didn't fix it... but I hadn't tried it. Its much appreciated and will go on my list of "things to try before whining" ;-) Thanks Dale. Mark Esheliam -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS d s: a-- C++>$ UL+ P+ L++ !E(---) W- N o? K? w O- M-- V-- PS+ PE-- Y+ !PGP !tv t+ 5? X? R* b+++ DI+ D- G++ e++> h---- r+++ y-- ------END GEEK CODE BLOCK------

