summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_eline.cpp6
-rw-r--r--src/commands/cmd_gline.cpp6
-rw-r--r--src/commands/cmd_kline.cpp6
-rw-r--r--src/commands/cmd_whois.cpp2
-rw-r--r--src/commands/cmd_zline.cpp4
5 files changed, 12 insertions, 12 deletions
diff --git a/src/commands/cmd_eline.cpp b/src/commands/cmd_eline.cpp
index 43eb678ee..ca39f9061 100644
--- a/src/commands/cmd_eline.cpp
+++ b/src/commands/cmd_eline.cpp
@@ -50,15 +50,15 @@ CmdResult CommandEline::Handle (const std::vector<std::string>& parameters, User
if (parameters.size() >= 3)
{
IdentHostPair ih;
- User* find = ServerInstance->FindNick(target.c_str());
- if (find)
+ User* find = ServerInstance->FindNick(target);
+ if ((find) && (find->registered == REG_ALL))
{
ih.first = "*";
ih.second = find->GetIPString();
target = std::string("*@") + find->GetIPString();
}
else
- ih = ServerInstance->XLines->IdentSplit(target.c_str());
+ ih = ServerInstance->XLines->IdentSplit(target);
if (ih.first.empty())
{
diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp
index 430256be8..6505b7464 100644
--- a/src/commands/cmd_gline.cpp
+++ b/src/commands/cmd_gline.cpp
@@ -51,15 +51,15 @@ CmdResult CommandGline::Handle (const std::vector<std::string>& parameters, User
if (parameters.size() >= 3)
{
IdentHostPair ih;
- User* find = ServerInstance->FindNick(target.c_str());
- if (find)
+ User* find = ServerInstance->FindNick(target);
+ if ((find) && (find->registered == REG_ALL))
{
ih.first = "*";
ih.second = find->GetIPString();
target = std::string("*@") + find->GetIPString();
}
else
- ih = ServerInstance->XLines->IdentSplit(target.c_str());
+ ih = ServerInstance->XLines->IdentSplit(target);
if (ih.first.empty())
{
diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp
index b1f5f62db..ce3642f91 100644
--- a/src/commands/cmd_kline.cpp
+++ b/src/commands/cmd_kline.cpp
@@ -51,15 +51,15 @@ CmdResult CommandKline::Handle (const std::vector<std::string>& parameters, User
if (parameters.size() >= 3)
{
IdentHostPair ih;
- User* find = ServerInstance->FindNick(target.c_str());
- if (find)
+ User* find = ServerInstance->FindNick(target);
+ if ((find) && (find->registered == REG_ALL))
{
ih.first = "*";
ih.second = find->GetIPString();
target = std::string("*@") + find->GetIPString();
}
else
- ih = ServerInstance->XLines->IdentSplit(target.c_str());
+ ih = ServerInstance->XLines->IdentSplit(target);
if (ih.first.empty())
{
diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp
index 00a9b3409..ba2ad9c15 100644
--- a/src/commands/cmd_whois.cpp
+++ b/src/commands/cmd_whois.cpp
@@ -64,7 +64,7 @@ CmdResult CommandWhois::Handle (const std::vector<std::string>& parameters, User
else
dest = ServerInstance->FindNick(parameters[userindex]);
- if (dest)
+ if ((dest) && (dest->registered == REG_ALL))
{
/*
* Okay. Umpteenth attempt at doing this, so let's re-comment...
diff --git a/src/commands/cmd_zline.cpp b/src/commands/cmd_zline.cpp
index 3e940a9bd..91d9c6255 100644
--- a/src/commands/cmd_zline.cpp
+++ b/src/commands/cmd_zline.cpp
@@ -53,9 +53,9 @@ CmdResult CommandZline::Handle (const std::vector<std::string>& parameters, User
return CMD_FAILURE;
}
- User *u = ServerInstance->FindNick(target.c_str());
+ User *u = ServerInstance->FindNick(target);
- if (u)
+ if ((u) && (u->registered == REG_ALL))
{
target = u->GetIPString();
}