Author Topic: Some borked line endings in Dead Souls 3.0  (Read 1986 times)

Offline Alecksy

  • Acquaintance
  • *
  • Posts: 21
    • View Profile
    • BucketMUD
Some borked line endings in Dead Souls 3.0
« on: August 12, 2010, 11:58:49 PM »
In Dead Souls 3.0, there are a few errant line endings where /n is used instead of the expect \n escape code. The more prominent instance is in /daemon/intermud.c where the startup-reply packet is logged. This causes the log file to not have properly terminate lines and makes it a pain to read. It's easy to fix, though!

Code: [Select]
diff --git a/lib/daemon/intermud.c b/lib/daemon/intermud.c
index 1af32bb..f00a902 100755
--- a/lib/daemon/intermud.c
+++ b/lib/daemon/intermud.c
@@ -130,7 +130,7 @@ static void eventRead(mixed *packet){
             }
     switch(packet[0]){
         case "startup-reply":
-            LOG_D->LogSpecial(LOG_I3,timestamp()+" "+identify(packet)+"/n");
+            LOG_D->LogSpecial(LOG_I3,timestamp()+" "+identify(packet)+"\n");
             tn("INTERMUD_D: "+identify(packet),"red");
             if( sizeof(packet) != 8 ){
                 //tn("We don't like the mudlist packet size.","red");
@@ -307,7 +307,7 @@ static void eventSocketClose(){
 static void eventConnectionFailure(){
     Online = 0;
         tn("INTERMUD_D: CONNECTION FAILED","red");
-        error("Failed to find a useful name server./n");
+        error("Failed to find a useful name server.\n");
 }
 
 int SetDestructOnClose(int x){ return 0; }
diff --git a/lib/secure/obj/post.c b/lib/secure/obj/post.c
index 201fab5..e4f72d4 100755
--- a/lib/secure/obj/post.c
+++ b/lib/secure/obj/post.c
@@ -1351,7 +1351,7 @@ static void confirm_subject(string str) {
     }
     else if(str == "y") get_subject("[No Subject]");
     else {
-        message("prompt", "Answer 'y' or 'n': /n", this_player());
+        message("prompt", "Answer 'y' or 'n': \n", this_player());
         input_to("confirm_subject");
         return;
     }

I did check Dead Souls Dev and it appears that one instance (the startup-reply packet logging) is fixed in Dead Souls 3.1a9, but the other instance in intermud.c is still present. I was unable to access /secure/obj/post.c on Dead Souls Dev to double-check it so I'm not sure if that one's been fixed or not.
Chil@BucketMUD
www.bucketmud.tk

Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
Re: Some borked line endings in Dead Souls 3.0
« Reply #1 on: August 13, 2010, 06:33:07 PM »
Will be fixed in 3.1a10. Thanks!

-Crat