From: Matt Mullins Date: Thu, 1 Sep 2011 01:18:04 +0000 (-0500) Subject: Add Supervisor, TableId, and the [future] irc_object_sup to the IRC connection state. X-Git-Tag: v5~13 X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=0870ad7cf5f7c88d95338460fee88d59081582bd;p=erlbot.git Add Supervisor, TableId, and the [future] irc_object_sup to the IRC connection state. --- diff --git a/irc/irc_conn.erl b/irc/irc_conn.erl index eb1c9ce..f18551b 100644 --- a/irc/irc_conn.erl +++ b/irc/irc_conn.erl @@ -1,6 +1,6 @@ -module(irc_conn). -behavior(gen_server). --vsn(1). +-vsn(2). -export([ start_link/3 @@ -21,7 +21,10 @@ config, % initial configuration params joined = false,% indicates whether we have joined the channels socket, - buffer = "" % for the TCP session + buffer = "", % for the TCP session + supervisor, % irc_net_sup instance + table_id, % ets table to hold shared data + object_sup = none % supervisor for irc_object_* }). start_link(Instance, Supervisor, TableId) -> @@ -41,7 +44,9 @@ init({Instance, Supervisor, TableId}) -> }), State = #irc_state{instance = Instance, config = Config, - socket = Socket + socket = Socket, + supervisor = Supervisor, + table_id = TableId }, {ok, State}.