3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

Allow multiple autojoin channels

This commit is contained in:
James Lu 2015-06-03 15:47:29 -07:00
parent 38bd58f7ff
commit 2e94e9a7d2
2 changed files with 5 additions and 3 deletions

View File

@ -22,7 +22,8 @@ server:
# SID - required for InspIRCd and TS6 based servers. This must be three characters long.
# The first char must be a digit [0-9], and the remaining two chars may be letters [A-Z] or digits.
sid: "0AL"
channel: "#pylink"
# Autojoin channels
channels: ["#pylink"]
# Plugins to load (omit the .py extension)
plugins:

View File

@ -80,8 +80,9 @@ def connect(irc):
host=host,
uid=uid))
f(':%s ENDBURST' % (irc.sid))
_sendFromUser(irc, "JOIN {channel} {ts} +nt :,{uid}".format(sid=irc.sid,
ts=int(time.time()), uid=irc.pseudoclient.uid, channel=irc.serverdata['channel']))
for channel in irc.serverdata['channels']:
_sendFromUser(irc, "JOIN {channel} {ts} +nt :,{uid}".format(sid=irc.sid,
ts=int(time.time()), uid=irc.pseudoclient.uid, channel=channel))
# :7NU PING 7NU 0AL
def handle_ping(irc, servernumeric, command, args):