All pastes #420285 Raw Edit

Someone

public lua v1 · immutable
·published 2007-04-02 01:11 UTC
rendered paste body
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	endend	--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	endend		HookEvent("onChat",chat_catch_conn)hookCommand("listen",commandListen,1000)hookCommand("stoplisten",commandStopListen,1000)