mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +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
|
grabTime = 864000 # 10 days
|
||||||
|
minRandomLength = 8
|
||||||
|
minRandomWords = 3
|
||||||
|
|
||||||
class QuoteGrabs(plugins.ChannelDBHandler,
|
class QuoteGrabs(plugins.ChannelDBHandler,
|
||||||
plugins.Toggleable,
|
plugins.Toggleable,
|
||||||
@ -95,7 +97,8 @@ class QuoteGrabs(plugins.ChannelDBHandler,
|
|||||||
if ircutils.isChannel(msg.args[0]):
|
if ircutils.isChannel(msg.args[0]):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
if self.toggles.get('random', channel):
|
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)
|
db = self.getDb(channel)
|
||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
cursor.execute("""SELECT added_at FROM quotegrabs
|
cursor.execute("""SELECT added_at FROM quotegrabs
|
||||||
|
Loading…
Reference in New Issue
Block a user