예제 #1
0
 def start(self):
     last(self.cfg)
     if self.cfg.channel not in self.channels:
         self.channels.append(self.cfg.channel)
     self.stopped = False
     self.connected.clear()
     self.joined.clear()
     self.sock = None
     self.doconnect(self.cfg.server, self.cfg.nick, int(self.cfg.port))
     Client.start(self)
     Output.start(self)
     if not self.keeprunning:
         launch(self.keep)
     self.wait()
예제 #2
0
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)
예제 #3
0
 def start(self):
     last(self.cfg)
     launch(self.server)
예제 #4
0
def init():
    i = IRC()
    launch(i.start)
    return i
예제 #5
0
def init():
    f = Fetcher()
    launch(f.start)
    return f
예제 #6
0
 def run(self):
     thrs = []
     for fn, o in all("rss"):
         thrs.append(launch(self.fetch, o))
     return thrs
예제 #7
0
파일: krn.py 프로젝트: bthate67/libobj
 def init(mns):
     for mn in obj.spl(mns):
         mod = Kernel.getmod(mn)
         if "init" in dir(mod):
             hdl.launch(mod.init)
예제 #8
0
파일: krn.py 프로젝트: bthate67/libobj
 def run(self):
     thr = hdl.launch(self.start)
     super().run()
     return thr
예제 #9
0
파일: krn.py 프로젝트: bthate67/libobj
 def run(self):
     self.state.latest = time.time()
     hdl.launch(self.func, *self.args)