summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-31 18:29:12 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-31 18:29:12 +0300
commit0b1d9c0c58db75a1d4249f7b0fc3320b4de8cfa2 (patch)
treebfed7c73b8d63bcfaaa411e031bb5ab231807b72 /src/being/localplayer.cpp
parent0249e0c48bfcac25abe46fbaf61103df0984b832 (diff)
downloadplus-0b1d9c0c58db75a1d4249f7b0fc3320b4de8cfa2.tar.gz
plus-0b1d9c0c58db75a1d4249f7b0fc3320b4de8cfa2.tar.bz2
plus-0b1d9c0c58db75a1d4249f7b0fc3320b4de8cfa2.tar.xz
plus-0b1d9c0c58db75a1d4249f7b0fc3320b4de8cfa2.zip
Move away message to per server configuration file.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 33133a376..5153a57ed 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1891,7 +1891,7 @@ void LocalPlayer::setAfkMessage(std::string message)
{
config.setValue("afkFormat", 0);
}
- config.setValue("afkMessage", message);
+ serverConfig.setValue("afkMessage", message);
}
}
@@ -1909,7 +1909,8 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick)
if (mAfkTime == 0 || time < mAfkTime
|| time - mAfkTime > awayLimitTimer)
{
- std::string str(config.getStringValue("afkMessage"));
+ std::string str(serverConfig.getValue("afkMessage",
+ "I am away from keyboard."));
if (str.find("'NAME'") != std::string::npos)
replaceAll(str, "'NAME'", nick);