connChans = {} function commandListen(tar,nick,text,words) local str = "" local chan = words[2] local inTab = {} inTab.chan = chan inTab.to = tar table.insert(connChans,inTab) end function commandStopListen(tar,nick,text,words) local str = "" local chan = words[2] for k,v in pairs(connChans) do if v.chan == chan then connChans[k] = nil end end end --DoHook("onChat",words[3],nick,sayText) function chat_catch_conn(from,nick,text) for k,v in pairs(connChans) do if v.chan == from then privmsg(v.to,"<"..nick..":"..v.chan.."> "..text) end end end HookEvent("onChat",chat_catch_conn) hookCommand("listen",commandListen,1000) hookCommand("stoplisten",commandStopListen,1000)