- assigned_to: nobody --> snoopdave
- priority: 5 --> 9
It would be very useful for the chat engine to have a default class for creating bots. This class could be used either by derivation or by implementing an interface (just like the java.lang.Thread class with java.lang.Runnable) for handling incoming messages (either from the public chat channel or from a private chat).
It's default behaviour would be to connect to a defined channel on a defined chat server and automatically reconnect whenever the connection is dropped for whatever reason. Ideally the class would derive from java.io.Writer so that it can be used as a replacement for stdout and stderr, as well as implement to 'log' member functions used by Servlets so that servlets can also easily use it for message/error/status logging.
Messages (and messages only) could be buffered while there is no connection to the chat engine, up to a defined limit.
Ideally this would be implemented as a serializable JavaBean with all the above parameters as settable properties, so that any project that needs this facility just drops the bean into the software using one of the many IDEs like JBuilder, VisualCafe or VisualAge.
(FYI, I have a class based on RelayIRC which does a good part of this, albeit in an inelegant way. Please contact me for the source if desired).