Merge pull request #193 from mamarley/statusmsg
authorDaniel Albers <daniel@lbe.rs>
Fri, 1 Apr 2016 01:49:49 +0000 (03:49 +0200)
committerDaniel Albers <daniel@lbe.rs>
Fri, 1 Apr 2016 01:51:40 +0000 (03:51 +0200)
Handle STATUSMSG messages

CMakeLists.txt
appveyor.yml
src/common/aliasmanager.cpp

index aa0b492..f5ca780 100644 (file)
@@ -580,7 +580,7 @@ endif()
 
 include(GetGitRevisionDescription)
 get_git_head_revision(GIT_REFSPEC GIT_HEAD)
-git_describe(GIT_DESCRIBE --long)
+git_describe(GIT_DESCRIBE --long --dirty)
 
 # If not in a Git repo try to read GIT_HEAD and GIT_DESCRIBE from
 # enviroment
index a97c2e2..0aac172 100644 (file)
@@ -17,7 +17,7 @@ build_script:
 
     mkdir -Force $env:APPVEYOR_BUILD_FOLDER\work\build\$env:APPVEYOR_PROJECT_NAME
     cd $env:APPVEYOR_BUILD_FOLDER\work\build\$env:APPVEYOR_PROJECT_NAME
-    LogExec cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" -DUSE_QT5=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DBus=ON -DWITH_WEBKIT=OFF
+    LogExec cmake -G"Ninja" $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" -DUSE_QT5=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DBus=ON -DWITH_WEBKIT=ON
     CmakeImageInstall
 
     $imageDir = CreateDeployImage @(
@@ -57,10 +57,16 @@ build_script:
                             "bin\\Qt5Opengl\.dll",
                             "bin\\Qt5Multimedia\.dll",
                             "bin\\Qt5MultimediaWidgets\.dll",
+                            "bin\\Qt5Positioning\.dll",
+                            "bin\\Qt5PrintSupport\.dll",
                             "bin\\Qt5Qml\.dll",
                             "bin\\Qt5Quick\.dll",
                             "bin\\Qt5Script\.dll",
+                            "bin\\Qt5Sensors\.dll",
                             "bin\\Qt5Sql\.dll",
+                            "bin\\Qt5WebChannel\.dll",
+                            "bin\\Qt5WebKit\.dll",
+                            "bin\\Qt5WebKitWidgets\.dll",
                             "bin\\Qt5Widgets\.dll",
                             "bin\\Qt5XmlPatterns\.dll",
                             "bin\\.*libglesv2\.dll",
index cd21f99..fceb7b4 100644 (file)
@@ -128,11 +128,14 @@ void AliasManager::processInput(const BufferInfo &info, const QString &msg_, Com
     QString msg = msg_;
 
     // leading slashes indicate there's a command to call unless there is another one in the first section (like a path /proc/cpuinfo)
+    // For those habitally tied to irssi, "/ " also makes the rest of the line a literal message
     int secondSlashPos = msg.indexOf('/', 1);
     int firstSpacePos = msg.indexOf(' ');
-    if (!msg.startsWith('/') || (secondSlashPos != -1 && (secondSlashPos < firstSpacePos || firstSpacePos == -1))) {
+    if (!msg.startsWith('/') || firstSpacePos == 1 || (secondSlashPos != -1 && (secondSlashPos < firstSpacePos || firstSpacePos == -1))) {
         if (msg.startsWith("//"))
-            msg.remove(0, 1);  // //asdf is transformed to /asdf
+            msg.remove(0, 1);  // "//asdf" is transformed to "/asdf"
+        else if (msg.startsWith("/ "))
+            msg.remove(0, 2);  // "/ /asdf" is transformed to "/asdf"
         msg.prepend("/SAY "); // make sure we only send proper commands to the core
     }
     else {