summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2013-05-05 19:36:46 +0100
committerPeter Powell <petpow@saberuk.com>2013-05-21 22:11:27 +0100
commit48033e9b3a708f265c0bc2d62460a6cefa70dd45 (patch)
treef0f10444087fcf5b5c63c7ed1a672cb6ff550f5a /src/xline.cpp
parent994787e907cee7f6ed1b8f0ddbec95900a0f470a (diff)
Convert XLine::Displayable to return a std::string.
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index d347e3763..4bb9551ec 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -259,7 +259,7 @@ bool XLineManager::AddLine(XLine* line, User* user)
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())
{
- LookupIter i = x->second.find(line->Displayable());
+ LookupIter i = x->second.find(line->Displayable().c_str());
if (i != x->second.end())
{
// XLine propagation bug was here, if the line to be added already exists and
@@ -281,7 +281,7 @@ bool XLineManager::AddLine(XLine* line, User* user)
if (xlf->AutoApplyToUserList(line))
pending_lines.push_back(line);
- lookup_lines[line->type][line->Displayable()] = line;
+ lookup_lines[line->type][line->Displayable().c_str()] = line;
line->OnAdd();
FOREACH_MOD(I_OnAddLine,OnAddLine(user, line));
@@ -692,32 +692,32 @@ void XLine::DisplayExpiry()
{
bool onechar = (type.length() == 1);
ServerInstance->SNO->WriteToSnoMask('x', "Removing expired %s%s %s (set by %s %ld seconds ago)",
- type.c_str(), (onechar ? "-Line" : ""), Displayable(), source.c_str(), (long)(ServerInstance->Time() - set_time));
+ type.c_str(), (onechar ? "-Line" : ""), Displayable().c_str(), source.c_str(), (long)(ServerInstance->Time() - set_time));
}
-const char* ELine::Displayable()
+const std::string& ELine::Displayable()
{
- return matchtext.c_str();
+ return matchtext;
}
-const char* KLine::Displayable()
+const std::string& KLine::Displayable()
{
- return matchtext.c_str();
+ return matchtext;
}
-const char* GLine::Displayable()
+const std::string& GLine::Displayable()
{
- return matchtext.c_str();
+ return matchtext;
}
-const char* ZLine::Displayable()
+const std::string& ZLine::Displayable()
{
- return ipaddr.c_str();
+ return ipaddr;
}
-const char* QLine::Displayable()
+const std::string& QLine::Displayable()
{
- return nick.c_str();
+ return nick;
}
bool KLine::IsBurstable()