コード例 #1
0
ファイル: irc.py プロジェクト: lae/Servrhe
    def join(self, channel):
        passwords = yield self.config.get("passwords")
        actual, _, password = channel.partition(" ")

        if password:
            passwords[channel] = password
        elif actual in passwords:
            channel = "{} {}".format(actual, passwords[actual])

        self.channels[actual] = {}
        self.config.set("channels", self.channels.keys())
        self.config.set("passwords", passwords)

        IRCClient.join(self, channel.encode("utf8"))
        nick = normalize(self.nickname)
        self.dispatch("joined", actual, nick)
コード例 #2
0
ファイル: irc.py プロジェクト: skiddiks/Servrhe
    def join(self, channel, no_database=False):
        actual, _, password = channel.partition(" ")

        if not no_database:
            c, p, ac = yield self.master.modules["db"].channelGet(actual)

            if c:
                actual = c

            if not password and p:
                password = p

            yield self.master.modules["db"].channelSet(actual, password, True)

        if password:
            channel = u"{} {}".format(actual, password)

        self.channels[actual] = {}

        IRCClient.join(self, channel.encode("utf8"))
        nick = normalize(self.nickname)
        self.dispatch("joined", actual, nick)
コード例 #3
0
ファイル: irc.py プロジェクト: rcombs/Servrhe
    def join(self, channel, no_database=False):
        actual, _, password = channel.partition(" ")

        if not no_database:
            c, p, ac = yield self.master.modules["db"].channelGet(actual)

            if c:
                actual = c

            if not password and p:
                password = p

            yield self.master.modules["db"].channelSet(actual, password, True)

        if password:
            channel = u"{} {}".format(actual, password)

        self.channels[actual] = {}

        IRCClient.join(self, channel.encode("utf8"))
        nick = normalize(self.nickname)
        self.dispatch("joined", actual, nick)
コード例 #4
0
 def join(self, channel, key=None):
     self.config.addChannel(channel)
     return IRCClient.join(self, encode(channel), key)
コード例 #5
0
ファイル: irc.py プロジェクト: ojii/bottu
 def join(self, channel, key=None):
     log.msg("Joining %r" % channel)
     IRCClient.join(self, channel, key)