diff options
| author | 2026-03-29 13:34:14 +0100 | |
|---|---|---|
| committer | 2026-03-29 14:12:41 +0100 | |
| commit | 5095617d6c53081521efb673823946cbfc183753 (patch) | |
| tree | bd444f9c6b1a317500fc01902e6a1953a729bea9 /modules/delayjoin.cpp | |
| parent | Get rid of thismod/Parent in the mysql module. (diff) | |
Avoid the direct use of intptr_t wherever possible.
This may cause problems on systems like CheriBSD where the
pointer type stores extra data.
Diffstat (limited to 'modules/delayjoin.cpp')
| -rw-r--r-- | modules/delayjoin.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/delayjoin.cpp b/modules/delayjoin.cpp index 686f06e7d..090849d23 100644 --- a/modules/delayjoin.cpp +++ b/modules/delayjoin.cpp @@ -31,15 +31,17 @@ #include "modules/names.h" #include "modules/who.h" +using TimeExtItem = NumExtItem<time_t>; + class DelayJoinMode final : public SimpleChannelMode { private: - IntExtItem& unjoined; + TimeExtItem& unjoined; IRCv3::ServerTime::API servertime; public: - DelayJoinMode(const WeakModulePtr& Parent, IntExtItem& ext) + DelayJoinMode(const WeakModulePtr& Parent, TimeExtItem& ext) : SimpleChannelMode(Parent, "delayjoin", 'D') , unjoined(ext) , servertime(Parent) @@ -77,10 +79,10 @@ class JoinHook final : public ClientProtocol::EventHook { private: - const IntExtItem& unjoined; + const TimeExtItem& unjoined; public: - JoinHook(const WeakModulePtr& mod, const IntExtItem& unjoinedref) + JoinHook(const WeakModulePtr& mod, const TimeExtItem& unjoinedref) : ClientProtocol::EventHook(mod, "JOIN", 10) , unjoined(unjoinedref) { @@ -107,7 +109,7 @@ class ModuleDelayJoin final , public Who::VisibleEventListener { private: - IntExtItem unjoined; + TimeExtItem unjoined; JoinHook joinhook; DelayJoinMode djm; |
