1337 module for IRCnet #hspbp channel
-module(leet). | |
-export([ircmain/1, ircproc/1, reload/2]). | |
ircmain(Contact) -> | |
spawn(?MODULE, ircproc, [Contact]). | |
reload(Contact, Pid) -> | |
Pid ! reloaded, | |
ircproc(Contact). | |
ircproc(Contact) -> | |
case erlang:localtime() of | |
{_, {13, 37, _}} -> Contact ! {announce, "'1337"}, timer:sleep(60000); | |
_ -> nop | |
end, | |
receive | |
quit -> quit; | |
{ident, Pid} -> | |
Pid ! {ident, "leet"}, | |
ircproc(Contact); | |
{reload, Pid} -> | |
?MODULE:reload(Contact, Pid); | |
_ -> ircproc(Contact) | |
after 10000 -> | |
ircproc(Contact) | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment