master
Paul Walko 2019-10-22 00:10:20 -04:00
parent 3dfbc37fa3
commit 9b1debc378
1 changed files with 17 additions and 6 deletions

View File

@ -61,10 +61,21 @@ def f_remind(phenny, input):
teller = input.nick teller = input.nick
# @@ Multiple comma-separated tellees? Cf. Terje, #swhack, 2006-04-15 # @@ Multiple comma-separated tellees? Cf. Terje, #swhack, 2006-04-15
verb, tellee, msg = input.groups() groups = input.groups()
verb = verb verb = groups[0]
tellee = tellee # .tell
msg = msg if len(groups) == 2:
new_groups = groups[1].rstrip().split(' ', 1)
if len(new_groups) == 2:
tellee = new_groups[0]
msg = new_groups[1]
else:
# no msg, ignore
return
# tell:
else:
tellee = groups[1]
msg = groups[2]
tellee_original = tellee.rstrip('.,:;') tellee_original = tellee.rstrip('.,:;')
tellee = tellee_original.lower() tellee = tellee_original.lower()
@ -91,8 +102,8 @@ def f_remind(phenny, input):
# "your message may get lost.") # "your message may get lost.")
rand = random.random() rand = random.random()
if rand > 0.9999: response = "yeah, yeah" if rand > 0.999: response = "yeah, yeah"
elif rand > 0.999: response = "yeah, sure, whatever" elif rand > 0.99: response = "yeah, sure, whatever"
phenny.reply(response) phenny.reply(response)
elif teller.lower() == tellee: elif teller.lower() == tellee: