I took the snippet from the CircleMUD ftp site and noticed that it didn't work as well as I planned. So, we at L.O.R.D. M.U.D. decided to make it better. We took out all of the previous lines of code and added just a few lines to make it run. This works better and more efficient. What this code snippet actually does is allow Implementors to mail all players that are in the playerfile at once. This snippet also allows you to email all immortals that are in the game. mail.c: Find - if (GET_GOLD(ch) < STAMP_PRICE) { sprintf(buf, "$n tells you, 'A stamp costs %d coins.'\r\n" "$n tells you, '...which I see you can't afford.'", STAMP_PRICE); act(buf, FALSE, mailman, 0, ch, TO_VICT); return; } And after it put: if (str_cmp(buf, "all") && str_cmp(buf, "imms")) { if ((recipient = get_id_by_name(buf)) < 0) { act("$n tells you, 'No person by that name is registered here!'", FALSE, mailman, 0, ch, TO_VICT); return; } } if ((!(str_cmp(buf, "all")) || !(str_cmp(buf, "imms"))) && GET_LEVEL(ch) < LVL_IMPL) { act("$n tells you, 'You must be an Implementor to send a message to everyone or immortals!'", FALSE, mailman, 0, ch, TO_VICT); return; } if (!(str_cmp(buf, "all"))) { recipient = -1; } else if (!(str_cmp(buf, "imms"))) { recipient = -2; } Then find - void store_mail(long to, long from, char *message_pointer) { header_block_type header; data_block_type data; long last_address, target_address; char *msg_txt = message_pointer; int bytes_written = 0; int total_length = strlen(message_pointer); int i; and after it add - if (to == -1) { for (i = 0; i <= top_of_p_table; i++) store_mail(player_table[i].id, from, message_pointer); return; } if (to == -2) { imm_store_mail(from, message_pointer); return; } Then, add the following function to the end of the file - void imm_store_mail(long from, char *message_pointer) { struct char_file_u player; FILE * fl; ////////// // Open the player file. ////////// fl = fopen(PLAYER_FILE, "r+b"); ////////// // Loop through and read each player in the player file to see if they // are immort or above. ///////// for (;;) { fread(&player, sizeof(struct char_file_u), 1, fl); ////////// // If this is the end of the player file, return to mundane world. ////////// if (feof(fl)) { fclose(fl); return; } ////////// // Check to see if this player is an immort. ////////// if (player.level >= LVL_IMMORT) store_mail(get_id_by_name(player.name), from, message_pointer); } } That's it...this is 100% more efficient than the previous mail-all snippet and a lot less lines of code. To use this snippet, you don't need to give me credit, you just need to have fun mudding, now that I have graduated, I am spending all of my time mudding instead of working...oh well, that's life :) Mythran the Implementor - L.O.R.D. lord.midsouth.net:9990 riot@users.midsouth.net LOOKING FOR BUILDERS ALWAYS!