@sopel.module.nickname_commands(u'load')
@sopel.module.priority(u'low')
@sopel.module.thread(False)
def f_load(bot, trigger):
 if (not trigger.admin):
  return
 name = trigger.group(2)
 path = u''
 if (not name):
  return bot.reply(u'Load what?')
 if (name in sys.modules):
  return bot.reply(u'Module already loaded, use reload')
 mods = sopel.loader.enumerate_modules(bot.config)
 if (name not in mods):
  return bot.reply((u'Module %s not found' % name))
 (path, type_) = mods[name]
 load_module(bot, name, path, type_)

@ sopel . module . nickname_commands ( u'load' ) @ sopel . module . priority ( u'low' ) @ sopel . module . thread ( False ) def f_load ( bot , trigger ) : if ( not trigger . admin ) : return name = trigger . group ( 2 ) path = u'' if ( not name ) : return bot . reply ( u'Load what?' ) if ( name in sys . modules ) : return bot . reply ( u'Module already loaded, use reload' ) mods = sopel . loader . enumerate_modules ( bot . config ) if ( name not in mods ) : return bot . reply ( ( u'Module %s not found' % name ) ) ( path , type_ ) = mods [ name ] load_module ( bot , name , path , type_ )
loads a module .