projects
/
erlbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11b93c3
)
Add the irc_conn PID to the ETS table
author
Matt Mullins
<mmullins@mmlx.us>
Thu, 1 Sep 2011 01:10:32 +0000
(20:10 -0500)
committer
Matt Mullins
<mmullins@mmlx.us>
Thu, 1 Sep 2011 01:10:32 +0000
(20:10 -0500)
irc/irc_conn.erl
patch
|
blob
|
history
diff --git
a/irc/irc_conn.erl
b/irc/irc_conn.erl
index
2108db6
..
eb1c9ce
100644
(file)
--- a/
irc/irc_conn.erl
+++ b/
irc/irc_conn.erl
@@
-29,6
+29,8
@@
start_link(Instance, Supervisor, TableId) ->
{Instance, Supervisor, TableId}, []).
init({Instance, Supervisor, TableId}) ->
+ ets:insert(TableId, {irc_conn_pid, self()}), % record the connection PID in the table
+
{Instance, Config} = lists:keyfind(Instance, 1, config:get_config(irc)),
{Host, Port, Nick, Realname, _Channels} = Config,
{ok, Socket} = gen_tcp:connect(Host, Port, [list]),