mirror of
git://git.acid.vegas/IRCP.git
synced 2024-11-23 00:16:41 +00:00
Improved detection for ERR_TARGETTOOFAST
This commit is contained in:
parent
0f1ff57551
commit
344421f016
16
ircp.py
16
ircp.py
@ -393,20 +393,18 @@ class probe:
|
|||||||
elif event == '433': # ERR_NICKINUSE
|
elif event == '433': # ERR_NICKINUSE
|
||||||
self.nickanme = rndnick()
|
self.nickanme = rndnick()
|
||||||
await self.raw('NICK ' + self.nickname)
|
await self.raw('NICK ' + self.nickname)
|
||||||
elif event == '439' and len(args) >= 5: # ERR_TARGETTOOFAST
|
elif event == '439' and len(args) >= 11: # ERR_TARGETTOOFAST
|
||||||
target = args[3]
|
target = args[3]
|
||||||
msg = ' '.join(args[4:])[1:]
|
msg = ' '.join(args[4:])[1:]
|
||||||
|
seconds = args[10]
|
||||||
if target[:1] in ('#','&'):
|
if target[:1] in ('#','&'):
|
||||||
self.channels['all'].append(target)
|
self.channels['all'].append(target)
|
||||||
|
if seconds.isdigit():
|
||||||
|
self.jthrottle = throttle.seconds if int(seconds) > throttle.seconds else int(seconds)
|
||||||
else:
|
else:
|
||||||
self.nicks['check'].append(target)
|
self.nicks['check'].append(target)
|
||||||
if 'Target change too fast' in msg and len(args) >= 11:
|
|
||||||
seconds = args[10]
|
|
||||||
if seconds.isdigit():
|
if seconds.isdigit():
|
||||||
if target[:1] in ('#','&'):
|
self.nthrottle = throttle.seconds if int(seconds) > throttle.seconds else int(seconds)
|
||||||
self.jthrottle = throttle.seconds if int(seconds) > throttle.seconds else int(seconds)
|
|
||||||
else:
|
|
||||||
self.nthrottle = throttle.seconds if int(seconds) > throttle.seconds else int(seconds)
|
|
||||||
error(self.display + '\033[31merror\033[0m - delay found for ' + target, msg)
|
error(self.display + '\033[31merror\033[0m - delay found for ' + target, msg)
|
||||||
elif event == '465' and len(args) >= 5: # ERR_YOUREBANNEDCREEP
|
elif event == '465' and len(args) >= 5: # ERR_YOUREBANNEDCREEP
|
||||||
check = [check for check in bad.error if check in line.lower()]
|
check = [check for check in bad.error if check in line.lower()]
|
||||||
|
Loading…
Reference in New Issue
Block a user