diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-12 15:48:01 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-12 15:48:01 +0000 |
commit | 597ecea91e69f96869127ba1023c3d689c4c216c (patch) | |
tree | 42afd8d6edd8ea4106b244a42dc9ab8a15005bc8 /src/users.cpp | |
parent | 0898f10f75bcd8ecde21c73da90955f95dc30e50 (diff) |
Trunk fix for bug #505 reported by nenolod
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9468 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/users.cpp b/src/users.cpp index cdacdc5c2..5b46d172c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -859,6 +859,25 @@ void User::CheckClass() this->MaxChans = a->GetMaxChans(); } +void User::CheckLines() +{ + char* check[] = { "G" , "K", NULL }; + + if (!this->exempt) + { + for (int n = 0; check[n]; ++n) + { + XLine *r = ServerInstance->XLines->MatchesLine(check[n], this); + + if (r) + { + r->Apply(this); + return; + } + } + } +} + void User::FullConnect() { ServerInstance->stats->statsConnects++; @@ -881,24 +900,7 @@ void User::FullConnect() return; } - if (!this->exempt) - { - GLine *r = (GLine *)ServerInstance->XLines->MatchesLine("G", this); - - if (r) - { - r->Apply(this); - return; - } - - KLine *n = (KLine *)ServerInstance->XLines->MatchesLine("K", this); - - if (n) - { - n->Apply(this); - return; - } - } + CheckLines(); 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, ServerInstance->Config->Network, this->nick, this->ident, this->host); |