add factoid save command

This commit is contained in:
darkf 2013-10-27 02:06:20 -07:00
parent bebd9e6adc
commit 04f84d8815
1 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,12 @@ handleMessage(s, nick, chan, "$defact "::line) -> do
setFactoids(s, map_insert(factoids, k, v))
end.
handleMessage(s, "darkf", chan, "$savefacts") -> do
saveFactoids(getFactoids(s));
say(chan, "factoids saved.");
s
end.
handleMessage(s, nick, chan, "$ping") -> do say(chan, nick + ": pong"); s end.
handleMessage(s, "darkf", chan, "$quit") -> do
say(chan, "bye!");