diff --git a/config.yml.example b/config.yml.example index 1907b09..7eca2fa 100644 --- a/config.yml.example +++ b/config.yml.example @@ -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: diff --git a/proto.py b/proto.py index 5a7a47a..fb31eae 100644 --- a/proto.py +++ b/proto.py @@ -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):