--- smsdaemon/PluginManager.cpp 2008/12/08 21:28:40 157 +++ smsdaemon/PluginManager.cpp 2008/12/17 23:43:26 193 @@ -10,6 +10,8 @@ #include "plugins/StatusPlugin.h" #include "plugins/ListPlugin.h" #include "plugins/HostStatusPlugin.h" +#include "plugins/WeatherPlugin.h" +#include "plugins/UrlTriggerPlugin.h" typedef std::map::iterator MapIterator; @@ -26,12 +28,19 @@ { if (plugin != 0) { - std::string command = plugin->GetCommand(); - - if ( _plugins[ command ] == 0) - _plugins[ command ] = plugin; + if (plugin->IsHelper()) + { + _helper_plugins.push_back(plugin); + } else - Logger::logMessage( std::string("AddPlugin() -- already have a plugin called ") + command); + { + std::string command = plugin->GetCommand(); + + if ( _plugins[ command ] == 0) + _plugins[ command ] = plugin; + else + Logger::logMessage( std::string("AddPlugin() -- already have a plugin called ") + command); + } } else { @@ -56,6 +65,10 @@ static HostStatusPlugin hoststatus; + static WeatherPlugin weather; + + static UrlTriggerPlugin urltrigger("tou", "http://t-hoerup.dk/test.php"); + for(MapIterator it = _plugins.begin(); it != _plugins.end(); ++it) { Plugin* pl = (*it).second;