aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_callerid.cpp
diff options
context:
space:
mode:
authorGravatar Dominic Hamon2021-05-30 20:37:54 +0100
committerGravatar GitHub2021-05-30 20:37:54 +0100
commit02340285c564a7e82105137192d46d554a6fce3a (patch)
tree696d1a6249841de62c3fed70310c2a347fc66732 /src/modules/m_callerid.cpp
parentAdd a workaround for a bug in GitHub Actions. (diff)
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/modules/m_callerid.cpp')
-rw-r--r--src/modules/m_callerid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 0c568ecd0..591be8acb 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -178,7 +178,7 @@ class CommandAccept : public Command
public:
CallerIDExtInfo extInfo;
- unsigned int maxaccepts;
+ unsigned long maxaccepts;
CommandAccept(Module* Creator) : Command(Creator, "ACCEPT", 1),
extInfo(Creator)
{
@@ -279,7 +279,7 @@ public:
callerid_data* dat = extInfo.Get(user, true);
if (dat->accepting.size() >= maxaccepts)
{
- user->WriteNumeric(ERR_ACCEPTFULL, InspIRCd::Format("Accept list is full (limit is %d)", maxaccepts));
+ user->WriteNumeric(ERR_ACCEPTFULL, InspIRCd::Format("Accept list is full (limit is %lu)", maxaccepts));
return false;
}
if (!dat->accepting.insert(whotoadd).second)
@@ -361,7 +361,7 @@ class ModuleCallerID
// Configuration variables:
bool tracknick; // Allow ACCEPT entries to update with nick changes.
- unsigned int notify_cooldown; // Seconds between notifications.
+ unsigned long notify_cooldown; // Seconds between notifications.
/** Removes a user from all accept lists
* @param who The user to remove from accepts
@@ -419,7 +419,7 @@ public:
time_t now = ServerInstance->Time();
/* +g and *not* accepted */
user->WriteNumeric(ERR_TARGUMODEG, dest->nick, "is in +g mode (server-side ignore).");
- if (now > (dat->lastnotify + notify_cooldown))
+ if (now > (dat->lastnotify + long(notify_cooldown)))
{
user->WriteNumeric(RPL_TARGNOTIFY, dest->nick, "has been informed that you messaged them.");
dest->WriteRemoteNumeric(RPL_UMODEGMSG, user->nick, InspIRCd::Format("%s@%s", user->ident.c_str(), user->GetDisplayedHost().c_str()), InspIRCd::Format("is messaging you, and you have user mode +g set. Use /ACCEPT +%s to allow.",