コード例 #1
0
ファイル: irc.py プロジェクト: bthate67/obot
 def start(self):
     last(self.cfg)
     if self.cfg.channel not in self.channels:
         self.channels.append(self.cfg.channel)
     self.stopped.clear()
     self.connected.clear()
     self.joined.clear()
     self.sock = None
     self.doconnect(self.cfg.server, self.cfg.nick, int(self.cfg.port))
     self.connected.wait()
     Handler.start(self)
     Output.start(self)
     Bus.add(self)
     if not self.keeprunning:
         launch(self.keep)
     self.wait()
コード例 #2
0
ファイル: test_thr.py プロジェクト: bthate67/obot
 def test_thrs(self):
     thrs = []
     for x in range(Kernel.cfg.index or 1):
         thr = launch(exec)
         thrs.append(thr)
     for thr in thrs:
         thr.join()
     consume()
コード例 #3
0
ファイル: irc.py プロジェクト: bthate67/obot
def PRIVMSG(hdl, obj):
    if obj.txt.startswith("DCC CHAT"):
        if hdl.cfg.users and not hdl.users.allowed(obj.origin, "USER"):
            return
        try:
            dcc = DCC()
            launch(dcc.connect, obj)
            return
        except ConnectionError as ex:
            return
    if obj.txt:
        if obj.txt[0] in [hdl.cfg.cc, "!"]:
            obj.txt = obj.txt[1:]
        elif obj.txt.startswith("%s:" % hdl.cfg.nick):
            obj.txt = obj.txt[len(hdl.cfg.nick) + 1:]
        if hdl.cfg.users and not hdl.users.allowed(obj.origin, "USER"):
            return
        obj.type = "cmd"
        hdl.put(obj)
コード例 #4
0
ファイル: opt.py プロジェクト: bthate67/obot
 def start(self):
     self.stopped.clear()
     launch(self.output)
     return self
コード例 #5
0
 def start(self):
     last(self.cfg)
     launch(self.server)
コード例 #6
0
def init():
    f = Fetcher()
    launch(f.start)
    return f
コード例 #7
0
 def run(self):
     thrs = []
     for fn, o in all("rss"):
         thrs.append(launch(self.fetch, o))
     return thrs
コード例 #8
0
ファイル: clk.py プロジェクト: bthate67/obot
 def run(self):
     thr = launch(self.start)
     super().run()
     return thr
コード例 #9
0
ファイル: clk.py プロジェクト: bthate67/obot
 def run(self):
     self.state.latest = time.time()
     launch(self.func, *self.args)
コード例 #10
0
 def start(self):
     Bus.add(self)
     launch(self.handler)
     return self
コード例 #11
0
 def start(self):
     self.stopped = False
     launch(self.output)
     return self
コード例 #12
0
ファイル: irc.py プロジェクト: bthate67/obot
def init(k):
    i = IRC()
    launch(i.start)
    return i
コード例 #13
0
 def start(self):
     launch(self.dispatcher)
     return self