[smuxi: 3/3] Engine: ignore spaces around config keys and values in /config set command



commit e43770921f03fb6120411df5da99ebeb9fd31ada
Author: Mirco Bauer <meebey meebey net>
Date:   Wed Feb 19 21:08:59 2014 +0100

    Engine: ignore spaces around config keys and values in /config set command
    
    /config set Servers/XMPP/0/Nickname = Mirco Bauer is much nicer than
    /config set Servers/XMPP/0/Nickname=Mirco Bauer

 src/Engine/Session.cs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/Engine/Session.cs b/src/Engine/Session.cs
index d318589..bf7376c 100644
--- a/src/Engine/Session.cs
+++ b/src/Engine/Session.cs
@@ -735,10 +735,10 @@ namespace Smuxi.Engine
                         AddMessageToFrontend(cd, builder.ToMessage());
                         return;
                     }
-                    string setKey = setParam.Split('=')[0];
-                    string setValue = String.Join(
+                    var setKey = setParam.Split('=')[0].Trim();
+                    var setValue = String.Join(
                         "=", setParam.Split('=').Skip(1).ToArray()
-                    );
+                    ).Trim();
                     object oldValue = _UserConfig[setKey];
                     if (oldValue == null && setKey.StartsWith("MessagePatterns/")) {
                         var id = setKey.Split('/')[1];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]