rawsonj / triviabot

A simple IRC trivia bot written in python using twisted.
GNU General Public License v3.0
41 stars 52 forks source link

color code stuff also eats dollar signs #40

Closed edunham closed 10 years ago

edunham commented 10 years ago
14:56 <@trivia> Useless Trivia: Lee Harvey 
                Oswald's body tag was auctioned 
                off for---------- .
14:56 <@trivia> Clue: $6,6**
14:56 < edunham> $6,600
14:56 <@trivia> Question:
14:56 <@trivia> Useless Trivia: Lee Harvey 
                Oswald's body tag was auctioned 
                off for---------- .
14:56 <@trivia> Clue: $6,6*0
14:57 <@trivia> No one got it. The answer was: 
                $6,600
edunham commented 10 years ago

also

09:47 <@trivia> Next question:
09:47 <@trivia> History: The Symbols _ (Addition) And - (Subtraction) Came 
                Into General Use In 1489
09:47 <@trivia> Clue: +
09:47 < edunham> +
rawsonj commented 10 years ago

This is a duplicate of #39 since the same code responsible for that is responsible for this.

There is a fix in the refactoring branch that will take care of this, as it completely changes how sanitization happens in the bot.

You can enumerate the number of things the bot will eat and file issues for them, but it is not productive.

The code responsible just calls isalnum() to check if there is any weird characters at the beginning of the string and eats them if they are present. This was flawed but seemed to work at the time.

The new method sanitizes by regex, so will preserve symbols at the beginning of the string. It's just going to take me a while to merge the refactored branch since working on this is just a hobby and my time is taken up by other things.

Closing this issue since it's a duplicate.