Index: code/fred2/voiceactingmanager.cpp
===================================================================
--- code/fred2/voiceactingmanager.cpp	(revision 4865)
+++ code/fred2/voiceactingmanager.cpp	(working copy)
@@ -419,31 +419,33 @@
 
 			// determine sender
 			char sender[NAME_LENGTH+1];
-			strcpy(sender, get_message_sender(message->name));
 			int shipnum = ship_name_lookup(sender);
 
 			// we may have to use the callsign
 			if ((shipnum >= 0) && (*Fred_callsigns[shipnum]))
 			{
-				entry.Replace("$sender", Fred_callsigns[shipnum]);
+				strcpy(sender, Fred_callsigns[shipnum]);
+				end_string_at_first_hash_symbol(sender);
 			}
 			// account for hidden ship names
 			else if ((shipnum >= 0) && (Ships[shipnum].flags2 & SF2_HIDE_SHIP_NAME))
 			{
 				hud_stuff_ship_class(&Ships[shipnum], sender);
-				entry.Replace("$sender", sender);
+				end_string_at_first_hash_symbol(sender);
 			}
 			// use the regular sender text
 			else
 			{
+				strcpy(sender, get_message_sender(message->name));
+
 				// skip past the first # when truncating a name,
 				// in case of something like #Command or #Alpha 1
 				end_string_at_first_hash_symbol(&sender[1]);
-
-				// replace sender
-				entry.Replace("$sender", sender);
 			}
 
+			// replace sender
+			entry.Replace("$sender", sender);
+
 			fout("%s\n\n\n", (char *) (LPCTSTR) entry);
 		}
 	}
Index: code/hud/hudtarget.cpp
===================================================================
--- code/hud/hudtarget.cpp	(revision 4865)
+++ code/hud/hudtarget.cpp	(working copy)
@@ -6743,9 +6743,6 @@
 		}
 	}
 
-	// handle hash symbol
-	end_string_at_first_hash_symbol(ship_name);
-
 	// handle translation
 	if (Lcl_gr) {
 		lcl_translate_targetbox_name(ship_name);
@@ -6764,6 +6761,9 @@
 	} else {
 		strcpy(ship_name_text, ship_name);
 	}
+
+	// handle hash symbol
+	end_string_at_first_hash_symbol(ship_name_text);
 }
 
 extern char Fred_alt_names[MAX_SHIPS][NAME_LENGTH+1];
@@ -6782,9 +6782,6 @@
 		}
 	}
 
-	// handle hash symbol
-	end_string_at_first_hash_symbol(ship_class);
-
 	// handle translation
 	if (Lcl_gr) {
 		lcl_translate_targetbox_name(ship_class);
@@ -6797,4 +6794,7 @@
 	} else {
 		strcpy(ship_class_text, ship_class);
 	}
+
+	// handle hash symbol
+	end_string_at_first_hash_symbol(ship_class_text);
 }
Index: code/mission/missionmessage.cpp
===================================================================
--- code/mission/missionmessage.cpp	(revision 4865)
+++ code/mission/missionmessage.cpp	(working copy)
@@ -1993,9 +1993,12 @@
 			mission_parse_lookup_callsign_index(Ships[Message_shipnum].callsign_index, who_from);
 		} else if ( Ships[Message_shipnum].flags2 & SF2_HIDE_SHIP_NAME ) {
 			hud_stuff_ship_class(&Ships[Message_shipnum], who_from);
-		} else {
-			end_string_at_first_hash_symbol(who_from);
 		}
+		end_string_at_first_hash_symbol(who_from);
+	} else {
+		// skip past the first # when truncating a name,
+		// in case of something like #Command or #Alpha 1
+		end_string_at_first_hash_symbol(&who_from[1]);
 	}
 
 	HUD_sourced_printf( q->source, NOX("%s: %s"), who_from, buf );
