10 |
#include "plugins/StatusPlugin.h" |
#include "plugins/StatusPlugin.h" |
11 |
#include "plugins/ListPlugin.h" |
#include "plugins/ListPlugin.h" |
12 |
#include "plugins/HostStatusPlugin.h" |
#include "plugins/HostStatusPlugin.h" |
13 |
|
#include "plugins/WeatherPlugin.h" |
14 |
|
|
15 |
typedef std::map<std::string, Plugin*>::iterator MapIterator; |
typedef std::map<std::string, Plugin*>::iterator MapIterator; |
16 |
|
|
27 |
{ |
{ |
28 |
if (plugin != 0) |
if (plugin != 0) |
29 |
{ |
{ |
30 |
std::string command = plugin->GetCommand(); |
if (plugin->IsHelper()) |
31 |
|
{ |
32 |
if ( _plugins[ command ] == 0) |
_helper_plugins.push_back(plugin); |
33 |
_plugins[ command ] = plugin; |
} |
34 |
else |
else |
35 |
Logger::logMessage( std::string("AddPlugin() -- already have a plugin called ") + command); |
{ |
36 |
|
std::string command = plugin->GetCommand(); |
37 |
|
|
38 |
|
if ( _plugins[ command ] == 0) |
39 |
|
_plugins[ command ] = plugin; |
40 |
|
else |
41 |
|
Logger::logMessage( std::string("AddPlugin() -- already have a plugin called ") + command); |
42 |
|
} |
43 |
} |
} |
44 |
else |
else |
45 |
{ |
{ |
64 |
|
|
65 |
static HostStatusPlugin hoststatus; |
static HostStatusPlugin hoststatus; |
66 |
|
|
67 |
|
static WeatherPlugin weather; |
68 |
|
|
69 |
for(MapIterator it = _plugins.begin(); it != _plugins.end(); ++it) |
for(MapIterator it = _plugins.begin(); it != _plugins.end(); ++it) |
70 |
{ |
{ |
71 |
Plugin* pl = (*it).second; |
Plugin* pl = (*it).second; |