summaryrefslogtreecommitdiff
path: root/src/modules/m_shun.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:47:45 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:47:45 +0000
commit94bb5343b1464cbec9f58ee9d90a3deae3ac5308 (patch)
treeb472a590d1536d9dc23c47aa381429d00d16ed81 /src/modules/m_shun.cpp
parent2455cd671f4dbc017cf7bb76fb7b29e9f95f3b40 (diff)
Remove calls to strdup() in core, it is not better than std::string
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11623 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_shun.cpp')
-rw-r--r--src/modules/m_shun.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index f4532ecd1..8a0ca2aa3 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -21,7 +21,8 @@ class Shun : public XLine
public:
std::string matchtext;
- Shun(InspIRCd* Instance, time_t s_time, long d, const char* src, const char* re, const char *shunmask) : XLine(Instance, s_time, d, src, re, "SHUN")
+ Shun(InspIRCd* Instance, time_t s_time, long d, std::string src, std::string re, std::string shunmask)
+ : XLine(Instance, s_time, d, src, re, "SHUN")
{
this->matchtext = shunmask;
}
@@ -56,7 +57,8 @@ public:
void DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired shun %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time));
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired shun %s (set by %s %ld seconds ago)",
+ this->matchtext.c_str(), this->source.c_str(), (long int)(ServerInstance->Time() - this->set_time));
}
const char* Displayable()
@@ -74,7 +76,7 @@ class ShunFactory : public XLineFactory
/** Generate a shun
*/
- XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask)
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
{
return new Shun(ServerInstance, set_time, duration, source, reason, xline_specific_mask);
}