zigdon / xkcd-Bucket

Bucket is the channel bot for #xkcd
http://wiki.xkcd.com/irc/Bucket
121 stars 31 forks source link

Remembering using "I am something" does not work #69

Closed belak closed 5 years ago

belak commented 8 years ago

https://github.com/zigdon/xkcd-Bucket/blob/5dad7697ffa3dbff3e0615ced0da839601ddfc8a/bucket.pl#L1494-L1497

There is no way (currently) for the verb "am" to make it into that block, so the code inside this conditional is not reachable. I'm not sure if the regexes should be adjusted or that block should be removed.


Edited by @dgw 2018-10-10 to point to the correct line as it appeared when this issue was opened.

zigdon commented 8 years ago

Why not?

09:17:43 @zigdon | Bucket: I testing a thing 09:17:44 +Bucket | Okay, zigdon. 09:18:00 @zigdon | Bucket: undo last 09:18:01 +Bucket | Okay, zigdon, deleted that 'I' is 'testing a thing'.

Note that it seems that that bit of code didn't work (since this didn't end up saying 'zigdon is testing a thing'), but that's a different bug.

zigdon commented 8 years ago

Oh, just saw that you changed the title to indicate that bug, github never sent an email update on that. Yes, that seems to be broken.

dgw commented 6 years ago

I'd say this code should be removed, not fixed. Later in that function, Bucket rejects any attempts to edit one's own factoids:

https://github.com/zigdon/xkcd-Bucket/blob/e5a695357710d7972a5a22665be499214e18b6fc/bucket.pl#L1547-L1553

Even if the code block @belak referenced was reachable, the factoid would get kicked out by this check.