Index: main.cpp
===================================================================
--- main.cpp	(revision 199)
+++ main.cpp	(revision 200)
@@ -1953,7 +1953,6 @@
             {
                 nPriority = alert.nPriority;
                 strStatusBar = alert.strStatusBar;
-                strRPC = alert.strRPCError;
             }
         }
     }
Index: rpc.cpp
===================================================================
--- rpc.cpp	(revision 199)
+++ rpc.cpp	(revision 200)
@@ -1178,9 +1178,34 @@
 };
 map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
 
+string pAllowInSafeMode[] =
+{
+    "help",
+    "stop",
+    "getblockcount",
+    "getblocknumber",
+    "getconnectioncount",
+    "getdifficulty",
+    "getgenerate",
+    "setgenerate",
+    "gethashespersec",
+    "getinfo",
+    "getnewaddress",
+    "getaccountaddress",
+    "setlabel",
+    "getaccount",
+    "getlabel", // deprecated
+    "getaddressesbyaccount",
+    "getaddressesbylabel", // deprecated
+    "backupwallet",
+    "validateaddress",
+    "getwork",
+};
+set<string> setAllowInSafeMode(pAllowInSafeMode, pAllowInSafeMode + sizeof(pAllowInSafeMode)/sizeof(pAllowInSafeMode[0]));
 
 
 
+
 //
 // HTTP protocol
 //
@@ -1615,6 +1640,11 @@
             if (mi == mapCallTable.end())
                 throw JSONRPCError(-32601, "Method not found");
 
+            // Observe safe mode
+            string strWarning = GetWarnings("rpc");
+            if (strWarning != "" && !GetBoolArg("-disablesafemode") && !setAllowInSafeMode.count(strMethod))
+                throw JSONRPCError(-2, string("Safe mode: ") + strWarning);
+
             try
             {
                 // Execute
Index: main.h
===================================================================
--- main.h	(revision 199)
+++ main.h	(revision 200)
@@ -1754,7 +1754,7 @@
     // Actions
     string strComment;
     string strStatusBar;
-    string strRPCError;
+    string strReserved;
 
     IMPLEMENT_SERIALIZE
     (
@@ -1772,7 +1772,7 @@
 
         READWRITE(strComment);
         READWRITE(strStatusBar);
-        READWRITE(strRPCError);
+        READWRITE(strReserved);
     )
 
     void SetNull()
@@ -1790,7 +1790,7 @@
 
         strComment.clear();
         strStatusBar.clear();
-        strRPCError.clear();
+        strReserved.clear();
     }
 
     string ToString() const
@@ -1815,7 +1815,6 @@
                 "    nPriority    = %d\n"
                 "    strComment   = \"%s\"\n"
                 "    strStatusBar = \"%s\"\n"
-                "    strRPCError  = \"%s\"\n"
                 ")\n",
             nVersion,
             nRelayUntil,
@@ -1828,8 +1827,7 @@
             strSetSubVer.c_str(),
             nPriority,
             strComment.c_str(),
-            strStatusBar.c_str(),
-            strRPCError.c_str());
+            strStatusBar.c_str());
     }
 
     void print() const
