check if a channel is in attempted_join before attempting rejoin
This commit is contained in:
parent
8307a1121a
commit
f84a05aec5
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
import re, threading
|
import re, threading
|
||||||
|
|
||||||
import Utils
|
import Utils
|
||||||
|
|
||||||
RE_PREFIXES = re.compile(r"\bPREFIX=\((\w+)\)(\W+)(?:\b|$)")
|
RE_PREFIXES = re.compile(r"\bPREFIX=\((\w+)\)(\W+)(?:\b|$)")
|
||||||
|
@ -336,6 +335,7 @@ def handle_433(data):
|
||||||
|
|
||||||
@handler(description="we need a registered nickname for this channel", default_event=True)
|
@handler(description="we need a registered nickname for this channel", default_event=True)
|
||||||
def handle_477(data):
|
def handle_477(data):
|
||||||
|
if data.args[1].lower() in data.server.attempted_join:
|
||||||
bot.add_timer("rejoin", 5, channel_name=data.args[1],
|
bot.add_timer("rejoin", 5, channel_name=data.args[1],
|
||||||
key=data.server.attempted_join[data.args[1].lower()],
|
key=data.server.attempted_join[data.args[1].lower()],
|
||||||
server_id=data.server.id)
|
server_id=data.server.id)
|
||||||
|
|
Loading…
Reference in a new issue