summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inspsocket.cpp7
-rw-r--r--src/modules/m_delayjoin.cpp6
-rw-r--r--src/modules/m_delaymsg.cpp3
3 files changed, 4 insertions, 12 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 886130f1b..d3ee7538b 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -475,11 +475,8 @@ void BufferedSocket::DoWrite()
BufferedSocket::~BufferedSocket()
{
this->Close();
- if (Timeout)
- {
- // The timer is removed from the TimerManager in Timer::~Timer()
- delete Timeout;
- }
+ // The timer is removed from the TimerManager in Timer::~Timer()
+ delete Timeout;
}
void StreamSocket::HandleEvent(EventType et, int errornum)
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index 2474cd6ad..7e800572e 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -138,10 +138,6 @@ void ModuleDelayJoin::OnBuildNeighborList(User* source, IncludeChanList& include
void ModuleDelayJoin::OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list)
{
- /* Server origin */
- if (!user)
- return;
-
if (target_type != TYPE_CHANNEL)
return;
@@ -165,7 +161,7 @@ void ModuleDelayJoin::OnText(User* user, void* dest, int target_type, const std:
/* make the user visible if he receives any mode change */
ModResult ModuleDelayJoin::OnRawMode(User* user, Channel* channel, ModeHandler* mh, const std::string& param, bool adding)
{
- if (!user || !channel || param.empty())
+ if (!channel || param.empty())
return MOD_RES_PASSTHRU;
// If not a prefix mode then we got nothing to do here
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp
index c906e2c30..32a0ba96e 100644
--- a/src/modules/m_delaymsg.cpp
+++ b/src/modules/m_delaymsg.cpp
@@ -95,8 +95,7 @@ void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CULis
ModResult ModuleDelayMsg::OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype)
{
- /* Server origin */
- if ((!user) || (!IS_LOCAL(user)))
+ if (!IS_LOCAL(user))
return MOD_RES_PASSTHRU;
if ((target_type != TYPE_CHANNEL) || ((!allownotice) && (msgtype == MSG_NOTICE)))