Skip to content

Commit

Permalink
Biography: Make plugin compatible with stock Supybot.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Mar 28, 2013
1 parent 21639e4 commit 9acac15
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions Biography/config.py
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions Biography/plugin.py
Expand Up @@ -36,9 +36,16 @@
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):
Expand Down

0 comments on commit 9acac15

Please sign in to comment.