implement
This commit is contained in:
parent
31013f8ea7
commit
0e8eae2a40
11
irc.lamb
11
irc.lamb
|
@ -10,6 +10,11 @@ ADMINS = ["darkf"].
|
|||
-- channels to join
|
||||
CHANS = ["#lobby"].
|
||||
|
||||
-- the lexical environment that $eval uses
|
||||
EVAL_ENV = [("loop", loop),
|
||||
("repr", repr),
|
||||
("itos", itos)].
|
||||
|
||||
-- First we'll define some helper functions
|
||||
|
||||
map(f, []) -> [].
|
||||
|
@ -137,6 +142,12 @@ handleMessage(s, nick, chan, "$savefacts") -> do
|
|||
s
|
||||
end.
|
||||
|
||||
handleMessage(s, nick, chan, "$eval "::line) -> do
|
||||
ret = eval(line, EVAL_ENV);
|
||||
say(chan, nick + ": " + repr(ret));
|
||||
s
|
||||
end.
|
||||
|
||||
handleMessage(s, nick, chan, "$join "::j) -> do
|
||||
if isAdmin(nick) then do
|
||||
fputstr(sock, "JOIN " + j + "\r\n");
|
||||
|
|
Loading…
Reference in New Issue