summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-30 02:48:54 +0000
committeraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-30 02:48:54 +0000
commit58385dd458e927994957b6d603f7f9da3fc52e14 (patch)
tree70c39a58446bd4f60205a9c34cac78524a67dc54 /src
parentbca70575cb3d58127f80d92a388b60b5f5ed2fde (diff)
Commit -Wformat=2 -Wmissing-format-attributes, printf-like functions in inspircd now get treated like printf (meaning compile-time check goodness) in GCC
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9217 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_list.cpp4
-rw-r--r--src/commands/cmd_lusers.cpp2
-rw-r--r--src/commands/cmd_modules.cpp2
-rw-r--r--src/commands/cmd_topic.cpp2
-rw-r--r--src/commands/cmd_whois.cpp2
-rw-r--r--src/configreader.cpp2
-rw-r--r--src/dns.cpp2
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/modules/extra/m_rline.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp4
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_dccallow.cpp2
-rw-r--r--src/modules/m_delayjoin.cpp2
-rw-r--r--src/modules/m_http_client.cpp4
-rw-r--r--src/modules/m_invisible.cpp2
-rw-r--r--src/modules/m_operlevels.cpp2
-rw-r--r--src/modules/m_restrictchans.cpp2
-rw-r--r--src/modules/m_securelist.cpp2
-rw-r--r--src/modules/m_silence.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/main.h2
-rw-r--r--src/modules/m_svshold.cpp2
-rw-r--r--src/modules/m_xmlsocket.cpp2
-rw-r--r--src/users.cpp12
-rw-r--r--src/xline.cpp10
26 files changed, 39 insertions, 39 deletions
diff --git a/src/commands/cmd_list.cpp b/src/commands/cmd_list.cpp
index 764297f58..2c7971edd 100644
--- a/src/commands/cmd_list.cpp
+++ b/src/commands/cmd_list.cpp
@@ -64,13 +64,13 @@ CmdResult CommandList::Handle (const char* const* parameters, int pcnt, User *us
bool n = i->second->HasUser(user);
if ((i->second->IsModeSet('p')) && (!n))
{
- user->WriteNumeric(322, "%s *",user->nick,i->second->name);
+ user->WriteNumeric(322, "%s *",user->nick);
}
else
{
if (((!(i->second->IsModeSet('p'))) && (!(i->second->IsModeSet('s')))) || (n))
{
- user->WriteNumeric(322, "%s %s %d :[+%s] %s",user->nick,i->second->name,users,i->second->ChanModes(n),i->second->topic);
+ user->WriteNumeric(322, "%s %s %ld :[+%s] %s",user->nick,i->second->name,users,i->second->ChanModes(n),i->second->topic);
}
}
}
diff --git a/src/commands/cmd_lusers.cpp b/src/commands/cmd_lusers.cpp
index 95f2b1529..313e2d2b5 100644
--- a/src/commands/cmd_lusers.cpp
+++ b/src/commands/cmd_lusers.cpp
@@ -31,7 +31,7 @@ CmdResult CommandLusers::Handle (const char* const*, int, User *user)
if (ServerInstance->Users->UnregisteredUserCount())
user->WriteNumeric(253, "%s %d :unknown connections",user->nick,ServerInstance->Users->UnregisteredUserCount());
if (ServerInstance->ChannelCount())
- user->WriteNumeric(254, "%s %d :channels formed",user->nick,ServerInstance->ChannelCount());
+ user->WriteNumeric(254, "%s %ld :channels formed",user->nick,ServerInstance->ChannelCount());
if (ServerInstance->Users->LocalUserCount())
user->WriteNumeric(255, "%s :I have %d clients and 0 servers",user->nick,ServerInstance->Users->LocalUserCount());
diff --git a/src/commands/cmd_modules.cpp b/src/commands/cmd_modules.cpp
index eac31edd0..4e4679ce4 100644
--- a/src/commands/cmd_modules.cpp
+++ b/src/commands/cmd_modules.cpp
@@ -62,7 +62,7 @@ CmdResult CommandModules::Handle (const char* const*, int, User *user)
strlcpy(modulename,module_names[i].c_str(),256);
if (IS_OPER(user))
{
- user->WriteNumeric(702, "%s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,m,V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
+ user->WriteNumeric(702, "%s :0x%08lx %d.%d.%d.%d %s (%s)",user->nick,(unsigned long)m,V.Major,V.Minor,V.Revision,V.Build,ServerConfig::CleanFilename(modulename),flagstate+2);
}
else
{
diff --git a/src/commands/cmd_topic.cpp b/src/commands/cmd_topic.cpp
index f271a597d..2f1e2ea8c 100644
--- a/src/commands/cmd_topic.cpp
+++ b/src/commands/cmd_topic.cpp
@@ -37,7 +37,7 @@ CmdResult CommandTopic::Handle (const char* const* parameters, int pcnt, User *u
if (Ptr->topicset)
{
user->WriteNumeric(332, "%s %s :%s", user->nick, Ptr->name, Ptr->topic);
- user->WriteNumeric(333, "%s %s %s %d", user->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+ user->WriteNumeric(333, "%s %s %s %ld", user->nick, Ptr->name, Ptr->setby, Ptr->topicset);
}
else
{
diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp
index b0ce2b320..b72fd73e5 100644
--- a/src/commands/cmd_whois.cpp
+++ b/src/commands/cmd_whois.cpp
@@ -72,7 +72,7 @@ void do_whois(InspIRCd* ServerInstance, User* user, User* dest,unsigned long sig
*/
if ((idle) || (signon))
{
- ServerInstance->SendWhoisLine(user, dest, 317, "%s %s %d %d :seconds idle, signon time",user->nick, dest->nick, idle, signon);
+ ServerInstance->SendWhoisLine(user, dest, 317, "%s %s %lu %lu :seconds idle, signon time",user->nick, dest->nick, idle, signon);
}
ServerInstance->SendWhoisLine(user, dest, 318, "%s %s :End of /WHOIS list.",user->nick, dest->nick);
diff --git a/src/configreader.cpp b/src/configreader.cpp
index cba015ec9..35c65fede 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -741,7 +741,7 @@ void ServerConfig::ReportConfigError(const std::string &errormessage, bool bail,
ServerInstance->SNO->WriteToSnoMask('A', "There were errors in the configuration file:");
while (start < errors.length())
{
- ServerInstance->SNO->WriteToSnoMask('A', errors.substr(start, 360).c_str());
+ ServerInstance->SNO->WriteToSnoMask('A', errors.substr(start, 360));
start += 360;
}
}
diff --git a/src/dns.cpp b/src/dns.cpp
index 447b90781..4bb2da020 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -1116,7 +1116,7 @@ void DNS::HandleEvent(EventType, int)
/** Add a derived Resolver to the working set */
bool DNS::AddResolverClass(Resolver* r)
{
- ServerInstance->Logs->Log("RESOLVER",DEBUG,"AddResolverClass %08lx", r);
+ ServerInstance->Logs->Log("RESOLVER",DEBUG,"AddResolverClass 0x%08lx", (unsigned long)r);
/* Check the pointers validity and the id's validity */
if ((r) && (r->GetId() > -1))
{
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 0e5e11207..8d7046ef6 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -678,7 +678,7 @@ int InspIRCd::Run()
{
if (TIME < OLDTIME)
{
- SNO->WriteToSnoMask('A', "\002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",OLDTIME-TIME);
+ SNO->WriteToSnoMask('A', "\002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %ld secs.",OLDTIME-TIME);
}
if ((TIME % 3600) == 0)
diff --git a/src/modules/extra/m_rline.cpp b/src/modules/extra/m_rline.cpp
index 1b2cad8fd..db0a64c05 100644
--- a/src/modules/extra/m_rline.cpp
+++ b/src/modules/extra/m_rline.cpp
@@ -91,7 +91,7 @@ class CoreExport RLine : public XLine
void DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed R-Line %s (set by %s %d seconds ago)", this->matchtext.c_str(), this->source, this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed R-Line %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, this->duration);
}
const char* Displayable()
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 6ee124f22..81d919ad6 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -172,13 +172,13 @@ class ModuleSSLGnuTLS : public Module
for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
if ((ServerInstance->Config->ports[i]->GetPort() == portno) && (ServerInstance->Config->ports[i]->GetIP() == addr))
ServerInstance->Config->ports[i]->SetDescription("ssl");
- ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %d", portno);
+ ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %ld", portno);
sslports.append((addr.empty() ? "*" : addr)).append(":").append(ConvToStr(portno)).append(";");
}
catch (ModuleException &e)
{
- ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: FAILED to enable SSL on port %d: %s. Maybe it's already hooked by the same port on a different IP, or you have an other SSL or similar module loaded?", portno, e.GetReason());
+ ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: FAILED to enable SSL on port %ld: %s. Maybe it's already hooked by the same port on a different IP, or you have an other SSL or similar module loaded?", portno, e.GetReason());
}
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index c4bc180e5..c8fdefe62 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -195,13 +195,13 @@ class ModuleSSLOpenSSL : public Module
for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
if ((ServerInstance->Config->ports[i]->GetPort() == portno) && (ServerInstance->Config->ports[i]->GetIP() == addr))
ServerInstance->Config->ports[i]->SetDescription("ssl");
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %d", portno);
+ ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %ld", portno);
sslports.append((addr.empty() ? "*" : addr)).append(":").append(ConvToStr(portno)).append(";");
}
catch (ModuleException &e)
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: FAILED to enable SSL on port %d: %s. Maybe it's already hooked by the same port on a different IP, or you have an other SSL or similar module loaded?", portno, e.GetReason());
+ ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_gnutls.so: FAILED to enable SSL on port %ld: %s. Maybe it's already hooked by the same port on a different IP, or you have an other SSL or similar module loaded?", portno, e.GetReason());
}
}
}
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 047c55e7f..bb59cde3d 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -64,7 +64,7 @@ class BanRedirect : public ModeWatcher
if(adding && (channel->bans.size() > static_cast<unsigned>(maxbans)))
{
- source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %d)", source->nick, channel->name, channel->name, maxbans);
+ source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick, channel->name, channel->name, maxbans);
return false;
}
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 1f2b6227a..747616bc0 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -172,7 +172,7 @@ class CommandDccallow : public Command
if (length > 0)
{
- user->WriteNumeric(993, "%s %s :Added %s to DCCALLOW list for %d seconds", user->nick, user->nick, target->nick, length);
+ user->WriteNumeric(993, "%s %s :Added %s to DCCALLOW list for %ld seconds", user->nick, user->nick, target->nick, length);
}
else
{
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index 126221dd2..88a654cc7 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -188,7 +188,7 @@ class ModuleDelayJoin : public Module
user->Shrink("delayjoin");
}
- void WriteCommonFrom(User *user, Channel* channel, const char* text, ...)
+ void WriteCommonFrom(User *user, Channel* channel, const char* text, ...) CUSTOM_PRINTF(4, 5)
{
va_list argsPtr;
char textbuffer[MAXBUF];
diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp
index 9cf6e45b4..ef3cf5c33 100644
--- a/src/modules/m_http_client.cpp
+++ b/src/modules/m_http_client.cpp
@@ -260,7 +260,7 @@ void HTTPSocket::Connect(const std::string &ip)
{
this->response = new HTTPClientResponse((Module*)Mod, req.GetSource() , url.url, 0, "");
- Instance->Logs->Log("m_http_client",DEBUG,"HTTPSocket::Connect(%s) response=%08lx", ip.c_str(), response);
+ Instance->Logs->Log("m_http_client",DEBUG,"HTTPSocket::Connect(%s) response=%08lx", ip.c_str(), (unsigned long)response);
strlcpy(this->IP, ip.c_str(), MAXBUF);
strlcpy(this->host, ip.c_str(), MAXBUF);
@@ -354,7 +354,7 @@ void HTTPSocket::OnClose()
if (!closed)
{
closed = true;
- Instance->Logs->Log("m_http_client",DEBUG,"HTTPSocket::OnClose response=%08lx", response);
+ Instance->Logs->Log("m_http_client",DEBUG,"HTTPSocket::OnClose response=%08lx", (unsigned long)response);
std::string e;
if (data.empty())
{
diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp
index 685dc209a..b90394164 100644
--- a/src/modules/m_invisible.cpp
+++ b/src/modules/m_invisible.cpp
@@ -258,7 +258,7 @@ class ModuleInvisible : public Module
}
/* Fix by Eric @ neowin.net, thanks :) -- Brain */
- void WriteCommonFrom(User *user, Channel* channel, const char* text, ...)
+ void WriteCommonFrom(User *user, Channel* channel, const char* text, ...) CUSTOM_PRINTF(4,5)
{
va_list argsPtr;
char textbuffer[MAXBUF];
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index 972f78441..b436b953b 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -74,7 +74,7 @@ class ModuleOperLevels : public Module
}
if (dest_level > source_level)
{
- ServerInstance->SNO->WriteToSnoMask('A', "Oper %s (level %d) attempted to /kill a higher oper: %s (level %d): Reason: %s",source->nick,source_level,dest->nick,dest_level,reason.c_str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Oper %s (level %ld) attempted to /kill a higher oper: %s (level %ld): Reason: %s",source->nick,source_level,dest->nick,dest_level,reason.c_str());
dest->WriteServ("NOTICE %s :Oper %s attempted to /kill you!",dest->nick,source->nick);
source->WriteNumeric(481, "%s :Permission Denied - Oper %s is a higher level than you",source->nick,dest->nick);
return 1;
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index b2c4273e3..8543e9719 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -60,7 +60,7 @@ class ModuleRestrictChans : public Module
// channel does not yet exist (record is null, about to be created IF we were to allow it)
if (!chan)
{
- user->WriteNumeric(530, "%s %s :Only IRC operators may create new channels",user->nick,cname,cname);
+ user->WriteNumeric(530, "%s %s :Only IRC operators may create new channels",user->nick,cname);
return 1;
}
}
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index 3974cf017..95227e770 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -68,7 +68,7 @@ class ModuleSecureList : public Module
return 0;
/* Not exempt, BOOK EM DANNO! */
- user->WriteServ("NOTICE %s :*** You cannot list within the first %d seconds of connecting. Please try again later.",user->nick, WaitTime);
+ user->WriteServ("NOTICE %s :*** You cannot list within the first %ld seconds of connecting. Please try again later.",user->nick, WaitTime);
/* Some crap clients (read: mIRC, various java chat applets) muck up if they don't
* receive these numerics whenever they send LIST, so give them an empty LIST to mull over.
*/
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 4ff26aca6..165f00df9 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -110,7 +110,7 @@ class CommandSilence : public Command
}
if (sl->size() >= maxsilence)
{
- user->WriteNumeric(952, "%s %s :Your silence list is full",user->nick, user->nick, mask.c_str());
+ user->WriteNumeric(952, "%s %s :Your silence list is full",user->nick, user->nick);
return CMD_FAILURE;
}
sl->insert(std::make_pair<irc::string, time_t>(mask.c_str(), ServerInstance->Time()));
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 067b729ad..b37edf583 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -153,7 +153,7 @@ void ModuleSpanningTree::HandleLusers(const char* const* parameters, int pcnt, U
user->WriteNumeric(253, "%s %d :unknown connections",user->nick,ServerInstance->Users->UnregisteredUserCount());
if (ServerInstance->ChannelCount())
- user->WriteNumeric(254, "%s %d :channels formed",user->nick,ServerInstance->ChannelCount());
+ user->WriteNumeric(254, "%s %ld :channels formed",user->nick,ServerInstance->ChannelCount());
user->WriteNumeric(255, "%s :I have %d clients and %d servers",user->nick,ServerInstance->Users->LocalUserCount(),ulined_local_count ? this->CountLocalServs() - ulined_local_count : this->CountLocalServs());
user->WriteNumeric(265, "%s :Current Local Users: %d Max: %d",user->nick,ServerInstance->Users->LocalUserCount(),max_local);
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 4002ad61e..a3d249a51 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -134,7 +134,7 @@ class ModuleSpanningTree : public Module
/** Attempt to send a message to a user
*/
- void RemoteMessage(User* user, const char* format, ...);
+ void RemoteMessage(User* user, const char* format, ...) CUSTOM_PRINTF(3, 4);
/** Returns oper-specific MAP information
*/
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index b176d4a50..c5538dabd 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -261,7 +261,7 @@ class ModuleSVSHold : public Module
if ((*iter)->set_on + (*iter)->length <= ServerInstance->Time())
{
ServerInstance->Logs->Log("m_svshold",DEBUG, "m_svshold.so: hold on %s expired, removing...", (*iter)->nickname.c_str());
- ServerInstance->SNO->WriteToSnoMask('A',"%li second SVSHOLD on %s (%s) set %u seconds ago expired", (*iter)->length, (*iter)->nickname.c_str(), (*iter)->reason.c_str(), ServerInstance->Time() - (*iter)->set_on);
+ ServerInstance->SNO->WriteToSnoMask('A',"%li second SVSHOLD on %s (%s) set %ld seconds ago expired", (*iter)->length, (*iter)->nickname.c_str(), (*iter)->reason.c_str(), ServerInstance->Time() - (*iter)->set_on);
HoldMap.erase(assign((*iter)->nickname));
delete *iter;
safeiter = iter;
diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp
index f3bd530f7..821a8363b 100644
--- a/src/modules/m_xmlsocket.cpp
+++ b/src/modules/m_xmlsocket.cpp
@@ -71,7 +71,7 @@ class ModuleXMLSocket : public Module
}
catch (ModuleException &e)
{
- ServerInstance->Logs->Log("m_xmlsocket",DEFAULT, "m_xmlsocket.so: FAILED to enable XMLSocket on port %d: %s. Maybe you have another similar module loaded?", portno, e.GetReason());
+ ServerInstance->Logs->Log("m_xmlsocket",DEFAULT, "m_xmlsocket.so: FAILED to enable XMLSocket on port %ld: %s. Maybe you have another similar module loaded?", portno, e.GetReason());
}
}
}
diff --git a/src/users.cpp b/src/users.cpp
index f8a95af49..f8a1bd330 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -224,7 +224,7 @@ User::~User()
if (this->MyClass)
{
this->MyClass->RefCount--;
- ServerInstance->Logs->Log("USERS", DEBUG, "User destructor -- connect refcount now: %u", this->MyClass->RefCount);
+ ServerInstance->Logs->Log("USERS", DEBUG, "User destructor -- connect refcount now: %lu", this->MyClass->RefCount);
}
if (this->AllowedOperCommands)
{
@@ -520,7 +520,7 @@ bool User::AddBuffer(std::string a)
if (this->MyClass && (recvq.length() > this->MyClass->GetRecvqMax()))
{
this->SetWriteError("RecvQ exceeded");
- ServerInstance->SNO->WriteToSnoMask('A', "User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->MyClass->GetRecvqMax());
+ ServerInstance->SNO->WriteToSnoMask('A', "User %s RecvQ of %d exceeds connect class maximum of %lu",this->nick,recvq.length(),this->MyClass->GetRecvqMax());
return false;
}
@@ -597,7 +597,7 @@ void User::AddWriteBuf(const std::string &data)
* to repeatedly add the text to the sendq!
*/
this->SetWriteError("SendQ exceeded");
- ServerInstance->SNO->WriteToSnoMask('A', "User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->MyClass->GetSendqMax());
+ ServerInstance->SNO->WriteToSnoMask('A', "User %s SendQ of %d exceeds connect class maximum of %lu",this->nick,sendq.length() + data.length(),this->MyClass->GetSendqMax());
return;
}
@@ -1708,7 +1708,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
/* deny change if change will take class over the limit */
if (found->limit && (found->RefCount + 1 >= found->limit))
{
- ServerInstance->Logs->Log("USERS", DEBUG, "OOPS: Connect class limit (%u) hit, denying", found->limit);
+ ServerInstance->Logs->Log("USERS", DEBUG, "OOPS: Connect class limit (%lu) hit, denying", found->limit);
return this->MyClass;
}
@@ -1718,12 +1718,12 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
if (found == this->MyClass) // no point changing this shit :P
return this->MyClass;
this->MyClass->RefCount--;
- ServerInstance->Logs->Log("USERS", DEBUG, "Untying user from connect class -- refcount: %u", this->MyClass->RefCount);
+ ServerInstance->Logs->Log("USERS", DEBUG, "Untying user from connect class -- refcount: %lu", this->MyClass->RefCount);
}
this->MyClass = found;
this->MyClass->RefCount++;
- ServerInstance->Logs->Log("USERS", DEBUG, "User tied to new class -- connect refcount now: %u", this->MyClass->RefCount);
+ ServerInstance->Logs->Log("USERS", DEBUG, "User tied to new class -- connect refcount now: %lu", this->MyClass->RefCount);
}
return this->MyClass;
diff --git a/src/xline.cpp b/src/xline.cpp
index 19a15decf..3f0ddbf2b 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -552,27 +552,27 @@ void ELine::OnAdd()
void ELine::DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed E-Line %s@%s (set by %s %d seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed E-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
}
void QLine::DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed Q-Line %s (set by %s %d seconds ago)",this->nick,this->source,this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed Q-Line %s (set by %s %ld seconds ago)",this->nick,this->source,this->duration);
}
void ZLine::DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed Z-Line %s (set by %s %d seconds ago)",this->ipaddr,this->source,this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed Z-Line %s (set by %s %ld seconds ago)",this->ipaddr,this->source,this->duration);
}
void KLine::DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed K-Line %s@%s (set by %s %d seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed K-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
}
void GLine::DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed G-Line %s@%s (set by %s %d seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
+ ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed G-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,this->duration);
}
const char* ELine::Displayable()