summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_callerid.cpp27
-rw-r--r--src/modules/m_dccallow.cpp2
2 files changed, 10 insertions, 19 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 7c80aa657..a8a81daef 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -54,11 +54,8 @@ class callerid_data
}
User *u = ServerInstance->FindNick(tok);
- if (!u)
- {
- continue;
- }
- accepting.insert(u);
+ if ((u) && (u->registered == REG_ALL) && (!u->quitting) && (!IS_SERVER(u)))
+ accepting.insert(u);
}
}
@@ -165,18 +162,12 @@ public:
tok.erase(0, 1); // Remove the dash.
}
User* u = ServerInstance->FindNick(tok);
- if (u)
- {
- if (dash)
- out.append("-");
- out.append(u->uuid);
- }
- else
- {
- if (dash)
- out.append("-");
- out.append(tok);
- }
+ if ((!u) || (u->registered != REG_ALL) || (u->quitting) || (IS_SERVER(u)))
+ continue;
+
+ if (dash)
+ out.append("-");
+ out.append(u->uuid);
}
parameter = out;
}
@@ -212,7 +203,7 @@ public:
else
{
User* whotoadd = ServerInstance->FindNick(tok[0] == '+' ? tok.substr(1) : tok);
- if (whotoadd)
+ if ((whotoadd) && (whotoadd->registered == REG_ALL) && (!whotoadd->quitting) && (!IS_SERVER(whotoadd)))
return (AddAccept(user, whotoadd) ? CMD_SUCCESS : CMD_FAILURE);
else
{
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 0c1c5a185..0ec8fb395 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -102,7 +102,7 @@ class CommandDccallow : public Command
std::string nick = parameters[0].substr(1);
User *target = ServerInstance->FindNickOnly(nick);
- if (target)
+ if ((target) && (!IS_SERVER(target)) && (!target->quitting) && (target->registered == REG_ALL))
{
if (action == '-')