Skip to content

Commit 68229ea

Browse files
committed
Start adding more limits for release
1 parent b4f24f0 commit 68229ea

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

plugins/remind.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ def remind(text, nick, chan, db, conn, notice, async):
127127
return
128128

129129
count = len([x for x in reminder_cache if x[0] == conn.name and x[3] == nick.lower()])
130+
if count > 10:
131+
return "Sorry, you already have too many reminders queued, you will need to wait or clear your reminders to add any more."
130132

131133
time_string = parts[0].strip()
132134
message = colors.strip_all(parts[1].strip())
@@ -140,8 +142,8 @@ def remind(text, nick, chan, db, conn, notice, async):
140142
if not seconds:
141143
return "Invalid input."
142144

143-
if seconds > 2764800:
144-
return "I can't remind you of something more than (approximately) a month from now."
145+
if seconds > 2764800 or seconds < 60:
146+
return "Sorry, remind input must be more then a minute, and less then one month."
145147

146148
# work out the time to remind the user, and check if that time is in the past
147149
remind_time = datetime.fromtimestamp(current_epoch + seconds)

0 commit comments

Comments
 (0)