mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 02:24:12 +01:00
Changed magic numbers to variables.
This commit is contained in:
parent
5fb5241602
commit
be3e5e482a
@ -63,6 +63,8 @@ Add an example IRC session using this module here.
|
||||
""")
|
||||
|
||||
grabTime = 864000 # 10 days
|
||||
minRandomLength = 8
|
||||
minRandomWords = 3
|
||||
|
||||
class QuoteGrabs(plugins.ChannelDBHandler,
|
||||
plugins.Toggleable,
|
||||
@ -95,7 +97,8 @@ class QuoteGrabs(plugins.ChannelDBHandler,
|
||||
if ircutils.isChannel(msg.args[0]):
|
||||
channel = msg.args[0]
|
||||
if self.toggles.get('random', channel):
|
||||
if len(msg.args[1]) > 8 and len(msg.args[1].split()) > 3:
|
||||
if len(msg.args[1]) > minRandomLength and \
|
||||
len(msg.args[1].split()) > minRandomWords:
|
||||
db = self.getDb(channel)
|
||||
cursor = db.cursor()
|
||||
cursor.execute("""SELECT added_at FROM quotegrabs
|
||||
|
Loading…
Reference in New Issue
Block a user