summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 15:40:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 15:40:34 +0300
commit0b9105af0ae2b85a0a3ea5364d8a854d107ce34a (patch)
tree10d4c2e846010e55fe7a48cc9e84502938ef16ab /src/actions
parentba4e639a333eed40f95f7bf7a361c0bd0186c334 (diff)
downloadmanaplus-0b9105af0ae2b85a0a3ea5364d8a854d107ce34a.tar.gz
manaplus-0b9105af0ae2b85a0a3ea5364d8a854d107ce34a.tar.bz2
manaplus-0b9105af0ae2b85a0a3ea5364d8a854d107ce34a.tar.xz
manaplus-0b9105af0ae2b85a0a3ea5364d8a854d107ce34a.zip
Move chat command /disableaway into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp12
-rw-r--r--src/actions/commands.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 8a5cad3f2..aae31db26 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -622,4 +622,16 @@ impHandler(removeName)
return false;
}
+impHandler(disableAway)
+{
+ if (event.tab)
+ {
+ event.tab->setNoAway(true);
+ if (chatWindow)
+ chatWindow->saveState();
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 0874cefaa..140877eb5 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -63,6 +63,7 @@ namespace Actions
decHandler(disableHighlight);
decHandler(dontRemoveName);
decHandler(removeName);
+ decHandler(disableAway);
} // namespace Actions
#undef decHandler