File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ def get_channels(db, conn):
2323@hook .irc_raw ('004' )
2424def do_joins (db , conn , async ):
2525 chans = yield from async (get_channels , db , conn )
26+ join_throttle = conn .config .get ("join_throttle" , 0.4 )
2627 for chan in chans :
2728 conn .join (chan [1 ])
28- yield from asyncio .sleep (0.4 )
29+ yield from asyncio .sleep (join_throttle )
2930
3031
3132@hook .irc_raw ('JOIN' , singlethread = True )
Original file line number Diff line number Diff line change @@ -98,10 +98,11 @@ def onjoin(conn, bot):
9898 conn .cmd ('MODE' , conn .nick , mode )
9999
100100 # Join config-defined channels
101+ join_throttle = conn .config .get ('join_throttle' , 0.4 )
101102 bot .logger .info ("[{}|misc] Bot is joining channels for network." .format (conn .name ))
102103 for channel in conn .channels :
103104 conn .join (channel )
104- yield from asyncio .sleep (0.4 )
105+ yield from asyncio .sleep (join_throttle )
105106
106107 conn .ready = True
107108 bot .logger .info ("[{}|misc] Bot has finished sending join commands for network." .format (conn .name ))
You can’t perform that action at this time.
0 commit comments