bugfix
parent
3dfbc37fa3
commit
9b1debc378
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue