Biography: Make plugin compatible with stock Supybot.
parent
21639e4fd0
commit
9acac1512e
|
@ -30,9 +30,16 @@
|
|||
|
||||
import supybot.conf as conf
|
||||
import supybot.registry as registry
|
||||
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
||||
|
||||
_ = PluginInternationalization('Biography')
|
||||
try:
|
||||
from supybot.i18n import PluginInternationalization
|
||||
from supybot.i18n import internationalizeDocstring
|
||||
_ = PluginInternationalization('Biography')
|
||||
except:
|
||||
# This are useless functions that's allow to run the plugin on a bot
|
||||
# without the i18n plugin
|
||||
_ = lambda x:x
|
||||
internationalizeDocstring = lambda x:x
|
||||
|
||||
def configure(advanced):
|
||||
# This will be called by supybot to configure this module. advanced is
|
||||
|
|
|
@ -36,9 +36,16 @@ from supybot.commands import *
|
|||
import supybot.plugins as plugins
|
||||
import supybot.ircutils as ircutils
|
||||
import supybot.callbacks as callbacks
|
||||
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
||||
|
||||
_ = PluginInternationalization('Biography')
|
||||
try:
|
||||
from supybot.i18n import PluginInternationalization
|
||||
from supybot.i18n import internationalizeDocstring
|
||||
_ = PluginInternationalization('Biography')
|
||||
except:
|
||||
# This are useless functions that's allow to run the plugin on a bot
|
||||
# without the i18n plugin
|
||||
_ = lambda x:x
|
||||
internationalizeDocstring = lambda x:x
|
||||
|
||||
|
||||
class BiographyDB(plugins.ChannelUserDB):
|
||||
|
|
Loading…
Reference in New Issue