diff options
| author | Michał Zegan <webczat_200@poczta.onet.pl> | 2014-12-12 01:58:37 +0100 |
|---|---|---|
| committer | Michał Zegan <webczat_200@poczta.onet.pl> | 2014-12-12 03:48:00 +0100 |
| commit | d9c9f2a4077e695598f17961da64b8d50225e2f0 (patch) | |
| tree | 35825bcd2e2f329ebf37b9c5971fe921a19c9b8e /modules | |
| parent | 7213413f8b5c68a99f769facb93acfc3fc4ceb4e (diff) | |
Changed calls to Get() for bool extensible items to HasExt in the chanserv module, remove duplication of code.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/pseudoclients/chanserv.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 3640a006c..41a62d7b4 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -367,10 +367,6 @@ class ChanServCore : public Module, public ChanServService if (inhabit.HasExt(c)) return EVENT_STOP; - /* Channel is persistent, it shouldn't be deleted and the service bot should stay */ - if (c->ci && persist && persist->Get(c->ci)) - return EVENT_STOP; - return EVENT_CONTINUE; } @@ -382,7 +378,7 @@ class ChanServCore : public Module, public ChanServService for (registered_channel_map::iterator it = RegisteredChannelList->begin(), it_end = RegisteredChannelList->end(); it != it_end; ++it) { ChannelInfo *ci = it->second; - if (persist->Get(ci)) + if (persist->HasExt(ci)) { bool c; ci->c = Channel::FindOrCreate(ci->name, c, ci->time_registered); @@ -416,7 +412,7 @@ class ChanServCore : public Module, public ChanServService if (ci->c->HasMode("PERM")) persist->Set(ci); /* Persist may be in def cflags, set it here */ - else if (persist->Get(ci)) + else if (persist->HasExt(ci)) ci->c->SetMode(NULL, "PERM"); } |
