Index: trunk/FACT++/src/dimctrl.cc
===================================================================
--- trunk/FACT++/src/dimctrl.cc	(revision 13761)
+++ trunk/FACT++/src/dimctrl.cc	(revision 13764)
@@ -53,8 +53,9 @@
     map<string,string> fData;
     string fScript;
+    string fScriptUser;
 
     void ProcessStart()
     {
-        if (!fScript.empty() || fLabel>=0)
+        if (!fScript.empty() || fLabel>-3)
         {
             Error("Script execution still in progress.");
@@ -82,4 +83,8 @@
         }
 
+        const auto user = fData.find("user");
+        if (user!=fData.end())
+            fScriptUser = user->second;
+
         if (fDebug)
         {
@@ -95,5 +100,11 @@
         if (getCommand()==&fDimStop)
         {
-            Debug("Stop received");
+            const string user = fDimStop.getSize()>0 ? fDimStop.getString() : "";
+
+            string msg = "Stop received";
+            if (!user.empty())
+                msg += " from user '"+user+"'";
+
+            Debug(msg);
             Readline::SetLabel(-2);
         }
@@ -110,5 +121,5 @@
                   "|Text[string]:A human readable string sent by the last state change."),
         fDimStart("DIM_CONTROL/START", "C", this),
-        fDimStop("DIM_CONTROL/STOP", "", this)
+        fDimStop("DIM_CONTROL/STOP", "C", this)
     {
     }
@@ -181,6 +192,6 @@
 
             msg += ": "+Readline::GetScript()+" [";
-            if (!fUser.empty())
-                msg += fUser+":"+pid.str();
+            if (!fScriptUser.empty())
+                msg += fScriptUser+":"+pid.str();
             msg += "]";
 
@@ -212,9 +223,12 @@
         fVerbosity = 90;
 
+        fUser = conf.Get<string>("user");
+        fScriptUser = fUser;
+
         if (conf.Get<bool>("stop"))
-            return Dim::SendCommand("DIM_CONTROL/STOP") + 1;
+            return Dim::SendCommand("DIM_CONTROL/STOP", fUser) + 1;
 
         if (conf.Has("start"))
-            return Dim::SendCommand("DIM_CONTROL/START", conf.Get<string>("start")) + 1;
+            return Dim::SendCommand("DIM_CONTROL/START", conf.Get<string>("start")+" user="+fUser) + 1;
 
         fVerbosity = 40;
@@ -238,5 +252,4 @@
 
         fDebug = conf.Get<bool>("debug");
-        fUser  = conf.Get<string>("user");
 
         return -1;
@@ -253,4 +266,5 @@
                 Readline::Instance()->Execute(s, fData);
                 fScript = "";
+                fScriptUser = fUser;
             }
 
