jamesoff / bmotion

An Artificial Stupidity script for eggdrop bots
Other
60 stars 16 forks source link

"tell me a..." broken horribly? #16

Closed jamesoff closed 10 years ago

jamesoff commented 10 years ago
1233.56 [   Lord255] [13:33:07] <Lord255> tails, tell me a story
1233.56 [   Lord255] [13:33:13] <Tails> you're welcome
1234.08 [   Lord255] [13:33:31] <Lord255> tails, tell me a joke
1234.08 [   Lord255] [13:33:37] <Tails> No problem.
1234.09 [   Lord255] :D
1234.35 [   Lord255] is it stranger?
1235.11 [  Pancakes] Yeah, it literally gives me a numer, like 8845
Routhinator commented 10 years ago

I've just installed this and I can confirm this behavior:

<Routh> Darkwolf tell me a joke
<DarkWolf> Routh: 3168.
jamesoff commented 10 years ago

Horrible brokeness in complex_randomnumber.tcl by the looks of it:

The 2nd one is probably addressed somewhere else in the code - I recall writing some stuff (maybe for complex_questions.tcl) to make it 'standardise' the punctuation around the bot's nick at the start of a line so that the plugin only had to match on one form (e.g. botnick:)

Routhinator commented 10 years ago

Hmm it would be good if the bot was able to recognize several forms, based on how people type naturally. My bot is on a private IRC network I run for my writing site so people use various punctuations..

botnick: <command>
botnick, <command>
botnick... <command>

Your theory about not having the bot respond when it shouldn't is good, but I think this should only apply to alphanumeric modifiers and not punctuation modifiers.. for example:

No response

botnicksuffix
prefixbotnick
123botnick

Response

 "botnick"
 botnick:
 ....botnick
jamesoff commented 10 years ago

That's how pretty much every other plugin responds, it's just this one which is broken :)

For 123botnick there's a setting in settings.tcl which determines if it wraps it's nick with regexp begin-word and end-word markers (on by default)

Routhinator commented 10 years ago

Hmm, noticed you closed this and made a commit. I pull the latest, restarted/rehashed. Now the bot will not respond to any of the "tell me a..." commands at all.. responds in other ways still.

jamesoff commented 10 years ago

That's because the only one it's supposed to respond to is "tell me a number", the others don't exist :)