summaryrefslogtreecommitdiff
path: root/src/cmd_oper.cpp
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-15 12:28:18 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-15 12:28:18 +0000
commit63e3449dcd91e417d8c8710aa3ed9fc832e3bfe5 (patch)
tree7d71be34dc23d460f7b2542fec8f0730411f1f5e /src/cmd_oper.cpp
parent64f5e9a893ca8a68165f918c195b6a2cf284b58c (diff)
Fixed bug #414 (cosmetic issue with oper failure notices). Patch by dz
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8040 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_oper.cpp')
-rw-r--r--src/cmd_oper.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd_oper.cpp b/src/cmd_oper.cpp
index d9ae74bf6..8d1c753a6 100644
--- a/src/cmd_oper.cpp
+++ b/src/cmd_oper.cpp
@@ -118,10 +118,13 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user)
std::string fields;
if (!match_login)
fields.append("login ");
- if (!match_pass)
- fields.append("password ");
- if (!match_hosts)
- fields.append("hosts");
+ else
+ {
+ if (!match_pass)
+ fields.append("password ");
+ if (!match_hosts)
+ fields.append("hosts");
+ }
user->WriteServ("491 %s :Invalid oper credentials",user->nick);
snprintf(broadcast, MAXBUF, "WARNING! Failed oper attempt by %s!%s@%s using login '%s': The following fields do not match: %s",user->nick,user->ident,user->host, parameters[0], fields.c_str());