diff options
| author | 2013-06-06 01:07:22 +0200 | |
|---|---|---|
| committer | 2013-06-06 01:07:22 +0200 | |
| commit | d9d99cd02dadf34bfcc220734ba0c422f0acb3e6 (patch) | |
| tree | 72a11fab75875b7e4f739ddd203da60e5dcbc851 /src/modules/m_connectban.cpp | |
| parent | Refactor Channel::UserList() to use std::string (diff) | |
| parent | Release 2.0.13 (diff) | |
| download | inspircd++-d9d99cd02dadf34bfcc220734ba0c422f0acb3e6.tar.gz inspircd++-d9d99cd02dadf34bfcc220734ba0c422f0acb3e6.tar.bz2 inspircd++-d9d99cd02dadf34bfcc220734ba0c422f0acb3e6.zip | |
Merge insp20
Diffstat (limited to 'src/modules/m_connectban.cpp')
| -rw-r--r-- | src/modules/m_connectban.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index d741dfb36..eca9352e8 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -93,11 +93,12 @@ class ModuleConnectBan : public Module { // Create zline for set duration. ZLine* zl = new ZLine(ServerInstance->Time(), banduration, ServerInstance->Config->ServerName, "Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.", mask.str()); - if (ServerInstance->XLines->AddLine(zl,NULL)) - ServerInstance->XLines->ApplyLines(); - else + if (!ServerInstance->XLines->AddLine(zl, NULL)) + { delete zl; - + return; + } + ServerInstance->XLines->ApplyLines(); std::string maskstr = mask.str(); std::string timestr = ServerInstance->TimeString(zl->expiry); ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z:line on *@%s to expire on %s: Connect flooding", |
