All pastes #420287 Raw Edit

listen.lua

public lua v1 · immutable
·published 2007-04-02 01:11 UTC
rendered paste body
listen = {}listen.Active = {}function listen.Add(sender, channel, arg)	if table.haskey(listen.Active, arg) then return end	listen.Active[arg] = channelendcommand.Add("listen", listen.Add, command.MSG, 5)function listen.Remove(sender, channel, arg)	listen.Active[arg] = nilendcommand.Add("stoplisten", listen.Remove, command.MSG, 5)function listen.Listen(sender, channel, arg)	for k,v in pairs(listen.Active) do		if k == channel then			sendMessage(v, "<"..sender..":"..channel.."> "..arg)		end	endendhook.Add(listen.Listen, hook.MSG, "listen.Listen")