Rev 1656 | Rev 1741 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1656 | Rev 1657 | ||
|---|---|---|---|
| Line 194... | Line 194... | ||
| 194 | 194 | ||
| 195 | for (unsigned int c = 0; c < this->plugins_.size(); c++) |
195 | for (unsigned int c = 0; c < this->plugins_.size(); c++) |
| 196 | { |
196 | { |
| 197 | this->plugins_[c]->InitializeDone(); |
197 | this->plugins_[c]->InitializeDone(); |
| 198 | } |
198 | } |
| 199 | - | ||
| 200 | LOG.Info("VM initialized."); |
- | |
| 201 | } |
199 | } |
| 202 | 200 | ||
| 203 | bool Manager::ImportFunction(std::string functionname) |
201 | bool Manager::ImportFunction(std::string functionname) |
| 204 | { |
202 | { |
| 205 | v8::Context::Scope context_scope(this->context_); |
203 | v8::Context::Scope context_scope(this->context_); |
| Line 226... | Line 224... | ||
| 226 | { |
224 | { |
| 227 | for (unsigned int n = 0; n < this->loaded_scripts_.size(); n++) |
225 | for (unsigned int n = 0; n < this->loaded_scripts_.size(); n++) |
| 228 | { |
226 | { |
| 229 | if (this->loaded_scripts_[n] == scriptname) |
227 | if (this->loaded_scripts_[n] == scriptname) |
| 230 | { |
228 | { |
| 231 | LOG. |
229 | LOG.Debug(scriptname + " is already loaded."); |
| 232 | return true; |
230 | return true; |
| 233 | } |
231 | } |
| 234 | } |
232 | } |
| 235 | 233 | ||
| 236 | std::string path = this->user_script_path_ + scriptname; |
234 | std::string path = this->user_script_path_ + scriptname; |
| Line 291... | Line 289... | ||
| 291 | } |
289 | } |
| 292 | } |
290 | } |
| 293 | 291 | ||
| 294 | this->loaded_scripts_.push_back(scriptname); |
292 | this->loaded_scripts_.push_back(scriptname); |
| 295 | 293 | ||
| 296 | LOG.Info(" |
294 | LOG.Info("\033[32mLoaded " + scriptname + " successfully.\033[0m"); |
| 297 | return true; |
295 | return true; |
| 298 | } |
296 | } |
| 299 | 297 | ||
| 300 | void Manager::ExecuteHandler(std::string plugin_name, unsigned int request_id, std::string code) |
298 | void Manager::ExecuteHandler(std::string plugin_name, unsigned int request_id, std::string code) |
| 301 | { |
299 | { |