public
Description: erlang irc bot
Homepage: http://github/pizza/abbot
Clone URL: git://github.com/pizza/abbot.git
abbot / README
100644 42 lines (35 sloc) 1.087 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
% _ _ _
% /\ | | | | | |
% / \ | |__ | |__ ___ | |_
% / /\ \ | '_ \| '_ \ / _ \| __|
% / ____ \| |_) | |_) | (_) | |_
% /_/ \_\_.__/|_.__/ \___/ \__|
%
 
abbot() ->
  "goal is simple bot:",
  "correct, clear, concise, limber",
  "learning erlang -- fun()".
 
get_started() ->
  install_erlang(),
  "git clone git://github.com/pizza/abbot.git ~/abbot",
  "cd ~/abbot/src",
  "modify bot.erl 'master', 'pass' and 'chan' -defines",
  "make",
  "./abbot.sh",
  % in shell type:
  Bot0 = spawn(bot, go, ["irc.dal.net"]).
 
kill_bot() ->
  Bot0 ! quit.
 
plugin_hot_reload() ->
  % how to modify plugins and reload them on the fly...
  % NOTE: works for plugins and any code EXCEPT bot.erl
  "modify plugin foo",
  % in shell...
  cd(plugin), % chdir
  c(foo), % compile
  foo:test(), % test, optional
  l(foo). % replace old with new
 
plugins_reload() ->
  % NOTE: plugins must be compiled and loaded first;
  % for develop you probably want plugin_hot_reload() instead
  Bot0 ! {reload, plugins}. % reload all plugins