FuelRats / pipsqueak

ED Fuel rats IRC bot
Other
13 stars 14 forks source link

Assigning rat on wrong platform causes strange result instead of warning #139

Closed SuperManifolds closed 8 years ago

SuperManifolds commented 8 years ago

How to reproduce:
!inject test test xbox !assign test xlexious

result: <mechasqueak[BOT]> test: Please add the following rat(s) to your friends list: u

Marenthyu commented 8 years ago

i think i may have found the issue. it should return a tuple of 'unknown', 'unknown' for (name, platform) but only returned name, so a reference to it with stuff[0] returned 'u' (1st letter of 'unknown')

Marenthyu commented 8 years ago

this got combined with the fact that i am not always consistent with strings and integers it seems... well duh. ids are always strings, but i return 0 as integer when it didnt get a proper id for a name

Marenthyu commented 8 years ago

hm, no, i am always using strings. anyway, added some tests that should ensure it.