summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index dd06b87a1..66d662a8d 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1891,8 +1891,11 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick)
if (mAfkTime == 0 || time < mAfkTime
|| time - mAfkTime > awayLimitTimer)
{
- std::string msg("*AFK*: "
- + config.getStringValue("afkMessage"));
+ std::string str(config.getStringValue("afkMessage"));
+ if (str.find("'NAME'") != std::string::npos)
+ replaceAll(str, "'NAME'", nick);
+
+ std::string msg("*AFK*: " + str);
if (config.getIntValue("afkFormat") == 1)
msg = "*" + msg + "*";