summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-01-27 16:37:40 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-01-27 16:37:40 +0100
commit764bf12c10b7a03bcf62e9b72ad7e8da81811f23 (patch)
treeac1a593fcf86da67d1d9b21a8ad163e19f4c437a
parent3d72f37f26e2473c2ce0af7a34428d53f7adf92f (diff)
m_alias Remove duplicate checks
-rw-r--r--src/modules/m_alias.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 2b38c894e..9055a8bf8 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -230,8 +230,6 @@ class ModuleAlias : public Module
int DoAlias(User *user, Channel *c, Alias *a, const std::string& compare, const std::string& safe)
{
- User *u = NULL;
-
/* Does it match the pattern? */
if (!a->format.empty())
{
@@ -252,16 +250,14 @@ class ModuleAlias : public Module
if (!a->RequiredNick.empty())
{
- u = ServerInstance->FindNick(a->RequiredNick);
+ User* u = ServerInstance->FindNick(a->RequiredNick);
if (!u)
{
user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick + " :is currently unavailable. Please try again later.");
return 1;
}
- }
- if ((u != NULL) && (!a->RequiredNick.empty()) && (a->ULineOnly))
- {
- if (!u->server->IsULine())
+
+ if ((a->ULineOnly) && (!u->server->IsULine()))
{
ServerInstance->SNO->WriteToSnoMask('a', "NOTICE -- Service "+a->RequiredNick+" required by alias "+a->AliasedCommand+" is not on a u-lined server, possibly underhanded antics detected!");
user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick + " :is an imposter! Please inform an IRC operator as soon as possible.");