diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-03 01:52:59 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-03 01:52:59 +0000 |
commit | de25d946733f774e3a5b53a58438a9c92af0acbe (patch) | |
tree | 459ccc3b0c2423f1592afec4b458615968a1176d /src/modules | |
parent | e57ed15735a3f23d6451845c7cf96758e6909d8c (diff) |
Get rid of a bunch of memory-wasting C-style strings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_alltime.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_antibear.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_callerid.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_chanlog.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_connectban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_dnsbl.cpp | 12 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_globalload.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_joinflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_nickflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ojoin.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_override.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_remove.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_rline.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_servprotect.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/opertype.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_spanningtree/override_map.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sqllog.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_testnet.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_uninvite.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_xline_db.cpp | 2 |
25 files changed, 41 insertions, 44 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 37f6a5fd2..63e8067e3 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -30,7 +30,7 @@ class CommandAlltime : public Command time_t now = ServerInstance->Time(); strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now)); - std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time is " + fmtdate + "(" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; + std::string msg = ":" + std::string(ServerInstance->Config->ServerName.c_str()) + " NOTICE " + user->nick + " :System time is " + fmtdate + "(" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; ServerInstance->DumpText(user, msg); diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp index a89e9dd4d..5f53b5fbb 100644 --- a/src/modules/m_antibear.cpp +++ b/src/modules/m_antibear.cpp @@ -42,7 +42,7 @@ class ModuleAntiBear : public Module { if (!strncmp(parameters[1].c_str(), "\1TIME Mon May 01 18:54:20 2006", 30)) { - ZLine* zl = new ZLine(ServerInstance->Time(), 86400, ServerInstance->Config->ServerName, + ZLine* zl = new ZLine(ServerInstance->Time(), 86400, ServerInstance->Config->ServerName.c_str(), "Unless you're stuck in a time warp, you appear to be a bear bot!", user->GetIPString()); if (ServerInstance->XLines->AddLine(zl,NULL)) { diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 45d3f0e5c..b0d8f54b7 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -391,7 +391,7 @@ public: { user->WriteNumeric(717, "%s %s :has been informed that you messaged them.", user->nick.c_str(), dest->nick.c_str()); ServerInstance->DumpText(dest, ":%s 718 %s %s %s@%s :is messaging you, and you have umode +g. Use /ACCEPT +%s to allow.", - ServerInstance->Config->ServerName, dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), user->nick.c_str()); + ServerInstance->Config->ServerName.c_str(), dest->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), user->nick.c_str()); dat->lastnotify = now; } return MOD_RES_DENY; diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp index 826c6f32f..e78a4dd47 100644 --- a/src/modules/m_chanlog.cpp +++ b/src/modules/m_chanlog.cpp @@ -84,7 +84,7 @@ class ModuleChanLog : public Module Channel *c = ServerInstance->FindChan(it->second); if (c) { - c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), buf); + c->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "PRIVMSG %s :%s", c->name.c_str(), buf); ServerInstance->PI->SendChannelPrivmsg(c, 0, buf); } @@ -148,7 +148,7 @@ class ChannelLogStream : public LogStream char buf[MAXBUF]; snprintf(buf, MAXBUF, "\2%s\2: %s", type.c_str(), msg.c_str()); - c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), buf); + c->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "PRIVMSG %s :%s", c->name.c_str(), buf); ServerInstance->PI->SendChannelPrivmsg(c, 0, buf); Logging = false; } diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index e3de63325..309499ff5 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -53,7 +53,7 @@ class CommandCheck : public Command CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { - if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName) + if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName.c_str()) return CMD_SUCCESS; User *targuser; diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index d13dc1e0a..b676fa681 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -90,7 +90,7 @@ class ModuleConnectBan : public Module if (i->second >= threshold) { // Create zline for set duration. - ZLine* zl = new ZLine(ServerInstance->Time(), banduration, ServerInstance->Config->ServerName, "Connect flooding", u->GetCIDRMask(range)); + ZLine* zl = new ZLine(ServerInstance->Time(), banduration, ServerInstance->Config->ServerName.c_str(), "Connect flooding", u->GetCIDRMask(range)); if (ServerInstance->XLines->AddLine(zl,NULL)) ServerInstance->XLines->ApplyLines(); else diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index cb32ede78..73d5316b5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -125,7 +125,7 @@ class DNSBLResolver : public Resolver } case DNSBLConfEntry::I_KLINE: { - KLine* kl = new KLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), + KLine* kl = new KLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName.c_str(), reason.c_str(), "*", them->GetIPString()); if (ServerInstance->XLines->AddLine(kl,NULL)) { @@ -139,7 +139,7 @@ class DNSBLResolver : public Resolver } case DNSBLConfEntry::I_GLINE: { - GLine* gl = new GLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), + GLine* gl = new GLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName.c_str(), reason.c_str(), "*", them->GetIPString()); if (ServerInstance->XLines->AddLine(gl,NULL)) { @@ -153,7 +153,7 @@ class DNSBLResolver : public Resolver } case DNSBLConfEntry::I_ZLINE: { - ZLine* zl = new ZLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), + ZLine* zl = new ZLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName.c_str(), reason.c_str(), them->GetIPString()); if (ServerInstance->XLines->AddLine(zl,NULL)) { @@ -378,12 +378,12 @@ class ModuleDNSBL : public Module total_hits += (*i)->stats_hits; total_misses += (*i)->stats_misses; - results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " + + results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " + ConvToStr((*i)->stats_hits) + " hits and " + ConvToStr((*i)->stats_misses) + " misses"); } - results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits)); - results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses)); + results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits)); + results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses)); return MOD_RES_PASSTHRU; } diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index b6dbee4ea..ebb5a0038 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -310,7 +310,7 @@ ModResult FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std } if (f->action == "gline") { - GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), "*", user->GetIPString()); + GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName.c_str(), f->reason.c_str(), "*", user->GetIPString()); if (ServerInstance->XLines->AddLine(gl,NULL)) { ServerInstance->XLines->ApplyLines(); @@ -399,7 +399,7 @@ ModResult FilterBase::OnPreCommand(std::string &command, std::vector<std::string if (f->action == "gline") { /* Note: We gline *@IP so that if their host doesnt resolve the gline still applies. */ - GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName, f->reason.c_str(), "*", user->GetIPString()); + GLine* gl = new GLine(ServerInstance->Time(), f->gline_time, ServerInstance->Config->ServerName.c_str(), f->reason.c_str(), "*", user->GetIPString()); if (ServerInstance->XLines->AddLine(gl,NULL)) { ServerInstance->XLines->ApplyLines(); diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 348984e14..636b9f4e4 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -30,7 +30,7 @@ class CommandGloadmodule : public Command { std::string servername = parameters.size() > 1 ? parameters[1] : "*"; - if (InspIRCd::Match(ServerInstance->Config->ServerName, servername)) + if (InspIRCd::Match(ServerInstance->Config->ServerName.c_str(), servername)) { if (ServerInstance->Modules->Load(parameters[0].c_str())) { @@ -68,7 +68,7 @@ class CommandGunloadmodule : public Command { std::string servername = parameters.size() > 1 ? parameters[1] : "*"; - if (InspIRCd::Match(ServerInstance->Config->ServerName, servername)) + if (InspIRCd::Match(ServerInstance->Config->ServerName.c_str(), servername)) { if (ServerInstance->Modules->Unload(parameters[0].c_str())) { @@ -106,7 +106,7 @@ class CommandGreloadmodule : public Command { std::string servername = parameters.size() > 1 ? parameters[1] : "*"; - if (InspIRCd::Match(ServerInstance->Config->ServerName, servername)) + if (InspIRCd::Match(ServerInstance->Config->ServerName.c_str(), servername)) { bool ok = true; if (!ServerInstance->Modules->Unload(parameters[0].c_str())) diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 2520cbfcf..54e221019 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -235,7 +235,7 @@ class ModuleJoinFlood : public Module { f->clear(); f->lock(); - memb->chan->WriteChannelWithServ((char*)ServerInstance->Config->ServerName, "NOTICE %s :This channel has been closed to new users for 60 seconds because there have been more than %d joins in %d seconds.", memb->chan->name.c_str(), f->joins, f->secs); + memb->chan->WriteChannelWithServ((char*)ServerInstance->Config->ServerName.c_str(), "NOTICE %s :This channel has been closed to new users for 60 seconds because there have been more than %d joins in %d seconds.", memb->chan->name.c_str(), f->joins, f->secs); } } } diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 28b3b1c50..a266d0aa5 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -61,7 +61,7 @@ class CommandKnock : public Command } line = line + parameters[parameters.size()-1]; - c->WriteChannelWithServ((char*)ServerInstance->Config->ServerName, "NOTICE %s :User %s is KNOCKing on %s (%s)", c->name.c_str(), user->nick.c_str(), c->name.c_str(), line.c_str()); + c->WriteChannelWithServ((char*)ServerInstance->Config->ServerName.c_str(), "NOTICE %s :User %s is KNOCKing on %s (%s)", c->name.c_str(), user->nick.c_str(), c->name.c_str(), line.c_str()); user->WriteServ("NOTICE %s :KNOCKing on %s", user->nick.c_str(), c->name.c_str()); return CMD_SUCCESS; } diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index 4e6dca5b9..d4b07b0c4 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -230,7 +230,7 @@ class ModuleNickFlood : public Module { f->clear(); f->lock(); - channel->WriteChannelWithServ((char*)ServerInstance->Config->ServerName, "NOTICE %s :No nick changes are allowed for 60 seconds because there have been more than %d nick changes in %d seconds.", channel->name.c_str(), f->nicks, f->secs); + channel->WriteChannelWithServ((char*)ServerInstance->Config->ServerName.c_str(), "NOTICE %s :No nick changes are allowed for 60 seconds because there have been more than %d nick changes in %d seconds.", channel->name.c_str(), f->nicks, f->secs); return MOD_RES_DENY; } } diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index c4ba99779..5bd9e3f91 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -70,7 +70,7 @@ class CommandOjoin : public Command if (notice) { channel = ServerInstance->FindChan(parameters[0]); - channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s joined on official network business.", + channel->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s joined on official network business.", parameters[0].c_str(), user->nick.c_str()); ServerInstance->PI->SendChannelNotice(channel, 0, std::string(user->nick) + " joined on official network business."); } diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 3c45bb37d..8162d45e3 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -150,7 +150,7 @@ class ModuleOverride : public Module } if (NoisyOverride) - chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str()); + chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str()); ServerInstance->SNO->WriteGlobalSno('G', user->nick+" used oper override to bypass +i on "+std::string(cname)); } return MOD_RES_ALLOW; @@ -166,7 +166,7 @@ class ModuleOverride : public Module } if (NoisyOverride) - chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str()); + chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str()); ServerInstance->SNO->WriteGlobalSno('G', user->nick+" used oper override to bypass +k on "+std::string(cname)); return MOD_RES_ALLOW; } @@ -181,7 +181,7 @@ class ModuleOverride : public Module } if (NoisyOverride) - chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str()); + chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str()); ServerInstance->SNO->WriteGlobalSno('G', user->nick+" used oper override to bypass +l on "+std::string(cname)); return MOD_RES_ALLOW; } @@ -196,7 +196,7 @@ class ModuleOverride : public Module } if (NoisyOverride) - chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str()); + chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str()); ServerInstance->SNO->WriteGlobalSno('G',"%s used oper override to bypass channel ban on %s", user->nick.c_str(), cname); return MOD_RES_ALLOW; } diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index ef60639f4..89565618b 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -103,7 +103,7 @@ class RemoveBase : public Command /* Build up the part reason string. */ reason = std::string("Removed by ") + user->nick + ": " + reasonparam; - channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str()); + channel->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str()); target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name.c_str(), reasonparam.c_str()); if (!channel->PartUser(target, reason)) diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 8bad04f29..31b382a22 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -75,7 +75,7 @@ class RLine : public XLine void Apply(User* u) { if (ZlineOnMatch) { - background_zlines.push_back(new ZLine(ServerInstance->Time(), duration ? expiry - ServerInstance->Time() : 0, ServerInstance->Config->ServerName, reason.c_str(), u->GetIPString())); + background_zlines.push_back(new ZLine(ServerInstance->Time(), duration ? expiry - ServerInstance->Time() : 0, ServerInstance->Config->ServerName.c_str(), reason.c_str(), u->GetIPString())); } DefaultApply(u, "R", false); } diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 96e54f8e7..4103de81b 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -87,7 +87,7 @@ class ModuleServProtectMode : public Module if (u->IsModeSet('k') && ServerInstance->Modes->ModeString(u, chan, false).find(mode) != std::string::npos) { /* BZZZT, Denied! */ - user->WriteNumeric(482, "%s %s :You are not permitted to remove privileges from %s services", user->nick.c_str(), chan->name.c_str(), ServerInstance->Config->Network); + user->WriteNumeric(482, "%s %s :You are not permitted to remove privileges from %s services", user->nick.c_str(), chan->name.c_str(), ServerInstance->Config->Network.c_str()); return MOD_RES_DENY; } } @@ -103,7 +103,7 @@ class ModuleServProtectMode : public Module if (dst->IsModeSet('k')) { - src->WriteNumeric(485, "%s :You are not permitted to kill %s services!", src->nick.c_str(), ServerInstance->Config->Network); + src->WriteNumeric(485, "%s :You are not permitted to kill %s services!", src->nick.c_str(), ServerInstance->Config->Network.c_str()); ServerInstance->SNO->WriteGlobalSno('a', std::string(src->nick)+" tried to kill service "+dst->nick+" ("+reason+")"); return MOD_RES_DENY; } diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 8b9f40e0b..7d6974cf0 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -91,7 +91,7 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) return; user->WriteNumeric(364, "%s %s %s :%d %s", user->nick.c_str(),Current->GetName().c_str(), - (Utils->FlatLinks && (!IS_OPER(user))) ? ServerInstance->Config->ServerName : Parent.c_str(), + (Utils->FlatLinks && (!IS_OPER(user))) ? ServerInstance->Config->ServerName.c_str() : Parent.c_str(), (Utils->FlatLinks && (!IS_OPER(user))) ? 0 : hops, Current->GetDesc().c_str()); } @@ -829,7 +829,7 @@ void ModuleSpanningTree::OnAddLine(User* user, XLine *x) char data[MAXBUF]; snprintf(data,MAXBUF,"%s %s %s %lu %lu :%s", x->type.c_str(), x->Displayable(), - ServerInstance->Config->ServerName, (unsigned long)x->set_time, (unsigned long)x->duration, x->reason.c_str()); + ServerInstance->Config->ServerName.c_str(), (unsigned long)x->set_time, (unsigned long)x->duration, x->reason.c_str()); parameterlist params; params.push_back(data); diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index 38b621fb5..dc9c0064f 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -47,10 +47,7 @@ bool TreeSocket::OperType(const std::string &prefix, parameterlist ¶ms) * If quiet bursts are enabled, and server is bursting or silent uline (i.e. services), * then do nothing. -- w00t */ - if ( - remoteserver->bursting || - ServerInstance->SilentULine(ServerInstance->FindServerNamePtr(u->server)) - ) + if (remoteserver->bursting || ServerInstance->SilentULine(u->server)) { dosend = false; } diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp index 147445c0c..7d09d939f 100644 --- a/src/modules/m_spanningtree/override_map.cpp +++ b/src/modules/m_spanningtree/override_map.cpp @@ -170,13 +170,13 @@ bool ModuleSpanningTree::HandleMap(const std::vector<std::string>& parameters, U { // terminate the string at maxnamew characters names[100 * t + maxnamew] = '\0'; - ServerInstance->DumpText(user, ":%s %d %s :%s %s", ServerInstance->Config->ServerName, + ServerInstance->DumpText(user, ":%s %d %s :%s %s", ServerInstance->Config->ServerName.c_str(), RPL_MAP, user->nick.c_str(), names + 100 * t, stats + 50 * t); } ServerInstance->DumpText(user, ":%s %d %s :%d server%s and %d user%s, average %.2f users per server", - ServerInstance->Config->ServerName, RPL_MAPUSERS, user->nick.c_str(), + ServerInstance->Config->ServerName.c_str(), RPL_MAPUSERS, user->nick.c_str(), line, (line > 1 ? "s" : ""), totusers, (totusers > 1 ? "s" : ""), avg_users); - ServerInstance->DumpText(user, ":%s %d %s :End of /MAP", ServerInstance->Config->ServerName, + ServerInstance->DumpText(user, ":%s %d %s :End of /MAP", ServerInstance->Config->ServerName.c_str(), RPL_ENDMAP, user->nick.c_str()); delete[] names; diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 96ca2236d..6279564df 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -99,7 +99,7 @@ bool TreeSocket::ParseUID(const std::string &source, parameterlist ¶ms) _new->nick.assign(params[2], 0, MAXBUF); _new->host.assign(params[3], 0, 64); _new->dhost.assign(params[4], 0, 64); - _new->server = ServerInstance->FindServerNamePtr(remoteserver->GetName().c_str()); + _new->server = remoteserver->GetName(); _new->ident.assign(params[5], 0, MAXBUF); _new->fullname.assign(params[params.size() - 1], 0, MAXBUF); _new->registered = REG_ALL; diff --git a/src/modules/m_sqllog.cpp b/src/modules/m_sqllog.cpp index 73f53f8c0..c70c1bf7a 100644 --- a/src/modules/m_sqllog.cpp +++ b/src/modules/m_sqllog.cpp @@ -292,7 +292,7 @@ class ModuleSQLLog : public Module virtual void OnLoadModule(Module* mod, const std::string &name) { - AddLogEntry(LT_LOADMODULE,name,ServerInstance->Config->ServerName, ServerInstance->Config->ServerName); + AddLogEntry(LT_LOADMODULE,name,ServerInstance->Config->ServerName.c_str(), ServerInstance->Config->ServerName.c_str()); } virtual Version GetVersion() diff --git a/src/modules/m_testnet.cpp b/src/modules/m_testnet.cpp index a4bdfc561..6a0cfa303 100644 --- a/src/modules/m_testnet.cpp +++ b/src/modules/m_testnet.cpp @@ -51,7 +51,7 @@ class ModuleTest : public Module public: ModuleTest() : cmd(this) { - if (!strstr(ServerInstance->Config->ServerName, ".test")) + if (!strstr(ServerInstance->Config->ServerName.c_str(), ".test")) throw ModuleException("Don't load modules without reading their descriptions!"); ServerInstance->AddCommand(&cmd); } diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp index c44e15511..1d7941b57 100644 --- a/src/modules/m_uninvite.cpp +++ b/src/modules/m_uninvite.cpp @@ -70,7 +70,7 @@ class CommandUninvite : public Command u->RemoveInvite(xname); user->WriteNumeric(494, "%s %s %s :Uninvited", user->nick.c_str(), c->name.c_str(), u->nick.c_str()); u->WriteNumeric(493, "%s :You were uninvited from %s by %s", u->nick.c_str(), c->name.c_str(), user->nick.c_str()); - c->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :*** %s uninvited %s.", c->name.c_str(), user->nick.c_str(), u->nick.c_str()); + c->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :*** %s uninvited %s.", c->name.c_str(), user->nick.c_str(), u->nick.c_str()); return CMD_SUCCESS; } diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 991d803d6..329fc8e27 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -117,7 +117,7 @@ class ModuleXLineDB : public Module { line = (*i); fprintf(f, "LINE %s %s %s %lu %lu :%s\n", line->type.c_str(), line->Displayable(), - ServerInstance->Config->ServerName, (unsigned long)line->set_time, (unsigned long)line->duration, line->reason.c_str()); + ServerInstance->Config->ServerName.c_str(), (unsigned long)line->set_time, (unsigned long)line->duration, line->reason.c_str()); } ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Finished writing XLines. Checking for error.."); |