CactusDev / CactusBot

An open source, community-written service-agnostic chat bot
MIT License
30 stars 6 forks source link

Fix arg duplication in a not hacky way #221

Closed Innectic closed 7 years ago

Innectic commented 7 years ago

Fixes #203

Innectic commented 7 years ago

@2Cubed It's something with the way that we split the MessagePackets. We're creating an array of MessagePacket. The last argument always contains that, I couldn't find out why. This is a fix that wouldn't require us to probably rewrite the whole splitter

2Cubed commented 7 years ago

@Innectic I just ran some tests, and it looks like MessagePacket.split() is fine... Also, it doesn't make much sense that the issue would be here; this is only checking for hyphenated commands.

Also, if .split() was broken, we would want to fix it.

Innectic commented 7 years ago

@2Cubed Then why does everything look fine before the split? The issue only occurs after the split happens.

2Cubed commented 7 years ago

Closed in favor of #222.