irc: Move irc-bot code to make use of generic methods
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 23 Dec 2016 20:22:28 +0000 (14:22 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 23 Dec 2016 20:22:28 +0000 (14:22 -0600)
commitbc24c9f3f29d3396ae9e52f9682914dec868838a
tree897c22f5e570ff1008575ec30bfdd41ecf24924c
parent3e27bb39df3dbaf65bd0581131610bfe6c824720
irc: Move irc-bot code to make use of generic methods

ircbot.scm demo also now makes use of subclassing.

* 8sync/systems/irc.scm (<irc-bot>): Removed line-handler field.
(irc-bot-dispatch-line): Renamed from irc-bot-dispatch-raw-line.
All callers changed.
(irc-bot-send-line): Moved position in file.
(irc-bot-handle-line): New method.
(irc-bot-handle-misc-input, irc-bot-handle-user-join)
(irc-bot-handle-user-quit): New stub methods.

* demos/ircbot.scm (<my-irc-bot>): New variable.
(irc-bot-handle-line): Now a generic method extending same named
method in 8sync/systems/irc.scm.  Previously was `handle-line'.
(run-bot): Use <my-irc-bot>.
(main): Remove debugging pk.
8sync/systems/irc.scm
demos/ircbot.scm