uofa-acm / BotPlate

A Java IRC bot template
3 stars 1 forks source link

Implement validation and error checking in IRCProtocol.Message #3

Open mgaut72 opened 9 years ago

mgaut72 commented 9 years ago

There is currently a validate method stubbed out.

Right now, Any IRC server that is speaking the correct protocol will not cause problems. However, an ill-formatted message will cause us to crash.

Validation and error checking should be implemented according to RFC 2812

Perhaps an exception should be thrown on an invalid message, or maybe just return null. That is still up for discussion.

Regardless, IRCBot should not go down on an invalid message.

gizmo385 commented 9 years ago

RFC 2812 describes the message format in terms of Augmented Backus-Naur Form which is described in RFC 5234.