コード例 #1
0
ファイル: plugin.py プロジェクト: hashbang-legacy/bot
def launch(pluginName, pipe):
  import api
  module = __import__("plugins." + pluginName)
  api.register("sendline", pipe.send)
  while True:
    line = pipe.recv()
    print("Remote read:" + line)
    api.emitEvent("line", line)
コード例 #2
0
ファイル: runner.py プロジェクト: hashbang-legacy/bot
def __pluginLauncher__(pipe, pluginName):
  import setproctitle
  setproctitle.setproctitle("plugin_" + pluginName)

  import api
  module = __import__("plugins." + pluginName)
  api.register("sendline", pipe.send)
  while True:
    line = pipe.recv()
    print("Remote read:" + line)
    api.emitEvent("line", line)
コード例 #3
0
 def privmsg(self, who, what, where):
   api.emitEvent("line", ":%[email protected] PRIVMSG %s:%s" %(
     who, where, what))