--- smsdaemon/Common.cpp 2008/12/21 18:41:08 208 +++ smsdaemon/Common.cpp 2008/12/23 12:09:08 216 @@ -13,6 +13,8 @@ #include "TaskManager.h" #include "PluginManager.h" #include "ConfigFile.h" +#include "Util.h" +#include "Logger.h" using namespace std; @@ -139,3 +141,40 @@ return out.str(); } + +void Common::LoadWorker(std::set& set, std::string config) +{ + set.clear(); + + std::vector items = Util::str_split( + _configFile->GetValue("smsdaemon",config,""), + ","); + + std::ostringstream log; + log << "Loaded list '" << config << "': "; + for (unsigned i=0; i::iterator it = _blacklist.find(phone); + return ( it != _blacklist.end() ); +} + +bool Common::IsPrivileged(const std::string& phone) +{ + std::set::iterator it = _privileged.find(phone); + return ( it != _privileged.end() ); +}