rename flood.max_time -> flood.duration
This commit is contained in:
@@ -58,7 +58,7 @@ class Config(ComboParser):
|
||||
self.add_item(section, 'message', str, None, 'message', False)
|
||||
self.add_item(section, 'threads', int, 1, '# of threads', False)
|
||||
self.add_item(section, 'once', int, 0, 'quit as soon as possible (default: 0)', False)
|
||||
self.add_item(section, 'max_time', int, 90, 'maximum time to run (default: 90 secs)', False)
|
||||
self.add_item(section, 'duration', int, 90, 'maximum time to run (default: 90 secs)', False)
|
||||
self.add_item(section, 'use_ssl', int, 2, 'Use ssl? (0: false, 1: true, 2: random) - default: 2', False)
|
||||
self.add_item(section, 'cycle', int, 0, 'cycle flood', False)
|
||||
self.add_item(section, 'change_nick', int, 0, 'Change nick between messages (useful when flooding privates) - default: 0', False)
|
||||
|
||||
@@ -58,8 +58,8 @@ def flood(sock):
|
||||
ticks = time.time()
|
||||
sent_ping = False
|
||||
while True:
|
||||
if config.flood.max_time > 0:
|
||||
if (time.time() - ticks) > config.flood.max_time: break
|
||||
if config.flood.duration > 0:
|
||||
if (time.time() - ticks) > config.flood.duration: break
|
||||
recv = sock.recvline()
|
||||
print(recv.strip())
|
||||
if not len(recv): break
|
||||
|
||||
Reference in New Issue
Block a user