summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-12 09:43:58 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-12 09:43:58 +0000
commitc5d8d3e3c6b7a5cb44572d9a9b6e5249d74cb1f7 (patch)
tree8c5858ae70914f77407ab5fcc8c90af965556b92
parent0a45c56f10efb2af30835652b75317f2969a0b06 (diff)
Fix for #564
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9961 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/users.h5
-rw-r--r--src/users.cpp9
2 files changed, 9 insertions, 5 deletions
diff --git a/include/users.h b/include/users.h
index 3edb9a99e..293465254 100644
--- a/include/users.h
+++ b/include/users.h
@@ -698,9 +698,10 @@ class CoreExport User : public connection
*/
User(InspIRCd* Instance, const std::string &uid = "");
- /** Check if the user matches a G or K line, and disconnect them if they do
+ /** Check if the user matches a G or K line, and disconnect them if they do.
+ * Returns true if the user matched a ban, false else.
*/
- void CheckLines();
+ bool CheckLines();
/** Returns the full displayed host of the user
* This member function returns the hostname of the user as seen by other users
diff --git a/src/users.cpp b/src/users.cpp
index c82c351ab..a86c6f824 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -886,7 +886,7 @@ void User::CheckClass()
this->MaxChans = a->GetMaxChans();
}
-void User::CheckLines()
+bool User::CheckLines()
{
const char* check[] = { "G" , "K", NULL };
@@ -899,10 +899,12 @@ void User::CheckLines()
if (r)
{
r->Apply(this);
- return;
+ return true;
}
}
}
+
+ return false;
}
void User::FullConnect()
@@ -927,7 +929,8 @@ void User::FullConnect()
return;
}
- CheckLines();
+ if (this->CheckLines())
+ return;
this->WriteServ("NOTICE Auth :Welcome to \002%s\002!",ServerInstance->Config->Network);
this->WriteNumeric(001, "%s :Welcome to the %s IRC Network %s!%s@%s",this->nick.c_str(), ServerInstance->Config->Network, this->nick.c_str(), this->ident.c_str(), this->host.c_str());