mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
ServerConfig::ServerName is a std::string, don't call .c_str() on it when passing it to Channel::WriteChannelWithServ, etc.
This commit is contained in:
parent
7eab4fd473
commit
6c67546af6
@ -38,7 +38,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.c_str()) + " NOTICE " + user->nick + " :System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName;
|
||||
std::string msg = ":" + ServerInstance->Config->ServerName + " NOTICE " + user->nick + " :System time is " + fmtdate + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName;
|
||||
|
||||
user->SendText(msg);
|
||||
|
||||
|
@ -85,7 +85,7 @@ class ModuleChanLog : public Module
|
||||
Channel *c = ServerInstance->FindChan(it->second);
|
||||
if (c)
|
||||
{
|
||||
c->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "PRIVMSG %s :%s", c->name.c_str(), buf);
|
||||
c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), buf);
|
||||
ServerInstance->PI->SendChannelPrivmsg(c, 0, buf);
|
||||
}
|
||||
}
|
||||
@ -147,7 +147,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.c_str(), "PRIVMSG %s :%s", c->name.c_str(), buf);
|
||||
c->WriteChannelWithServ(ServerInstance->Config->ServerName, "PRIVMSG %s :%s", c->name.c_str(), buf);
|
||||
ServerInstance->PI->SendChannelPrivmsg(c, 0, buf);
|
||||
Logging = false;
|
||||
}
|
||||
|
@ -417,12 +417,12 @@ class ModuleDNSBL : public Module
|
||||
total_hits += (*i)->stats_hits;
|
||||
total_misses += (*i)->stats_misses;
|
||||
|
||||
results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " +
|
||||
results.push_back(ServerInstance->Config->ServerName + " 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.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));
|
||||
results.push_back(ServerInstance->Config->ServerName + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits));
|
||||
results.push_back(ServerInstance->Config->ServerName + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses));
|
||||
|
||||
return MOD_RES_PASSTHRU;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ class CommandOjoin : public Command
|
||||
if (notice)
|
||||
{
|
||||
channel = ServerInstance->FindChan(parameters[0]);
|
||||
channel->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s joined on official network business.",
|
||||
channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s joined on official network business.",
|
||||
parameters[0].c_str(), user->nick.c_str());
|
||||
ServerInstance->PI->SendChannelNotice(channel, 0, user->nick + " joined on official network business.");
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ class ModuleOverride : public Module
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str());
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteGlobalSno('v', user->nick+" used oper override to bypass +i on "+std::string(cname));
|
||||
}
|
||||
return MOD_RES_ALLOW;
|
||||
@ -151,7 +151,7 @@ class ModuleOverride : public Module
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str());
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteGlobalSno('v', user->nick+" used oper override to bypass +k on "+std::string(cname));
|
||||
return MOD_RES_ALLOW;
|
||||
}
|
||||
@ -166,7 +166,7 @@ class ModuleOverride : public Module
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str());
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteGlobalSno('v', user->nick+" used oper override to bypass +l on "+std::string(cname));
|
||||
return MOD_RES_ALLOW;
|
||||
}
|
||||
@ -181,7 +181,7 @@ class ModuleOverride : public Module
|
||||
}
|
||||
|
||||
if (NoisyOverride)
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
|
||||
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
|
||||
ServerInstance->SNO->WriteGlobalSno('v',"%s used oper override to bypass channel ban on %s", user->nick.c_str(), cname);
|
||||
return MOD_RES_ALLOW;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class RemoveBase : public Command
|
||||
/* Build up the part reason string. */
|
||||
reason = "Removed by " + user->nick + ": " + reasonparam;
|
||||
|
||||
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());
|
||||
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());
|
||||
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());
|
||||
|
||||
channel->PartUser(target, reason);
|
||||
|
Loading…
x
Reference in New Issue
Block a user