Fork me on GitHub
  August 17, 2018, 07:24:05 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Plugins need to check if they are loaded?  (Read 1723 times)
Ligustah
Newbie
*
Posts: 42


View Profile
« on: February 27, 2011, 02:42:06 pm »

Why do plugins need to check if they are loaded already?
Isn't that a thing general enough for the plugin loader to take care of?
If i am not mistaken all plugins use the very same code to do that check,
so why not put it to a place where it is done for all the plugins automatically?
Logged
xoft
Newbie
*
Posts: 42


View Profile
« Reply #1 on: March 06, 2011, 01:20:36 pm »

I'm just trying to make up some reasons that could be behind this, don't take me too seriously Wink

There might be a scenario when actually loading a plugin twice would affect the way the plugin acts. For example a plugin that adds a bot that it controls may add another bot when loaded for the second time. Or a logging plugin might get loaded several times, each time with a different configuration (output file, verbosity, ...)
Logged
Fador
Administrator
Full Member
*****
Posts: 126


View Profile
« Reply #2 on: March 06, 2011, 01:23:28 pm »

..you don't really need to check if the plugin is already loaded inside the plugin if you don't want to Grin
Logged
Ligustah
Newbie
*
Posts: 42


View Profile
« Reply #3 on: March 09, 2011, 07:09:38 pm »

I was just wondering about that, because it seemed akward to me that all the plugins
i looked at checked for that in their code.
And it looked all the same.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!