DCWatch Bier Script 0.2.0.061007

Post finished Hubside Scripts here, known supporting hubsofts for LUA scripting.

ADCH++ | DCWatch | LUADCH
Post Reply
Toast

DCWatch Bier Script 0.2.0.061007

Post by Toast » 10 Feb 2008, 09:44

Code: Select all

-- DCWatch Lua Engine
-- DCWatch Bier Script 0.2.0.061007
dcwatch:show( "", "# DCWatch Lua Engine - DCWatch Bier Script" )

bierEvents = {}

function bierEvents.doMainReceived( hub_id, sender, message )
	local hub = dcwatch:getHubManager():getHubByHost( hub_id )
	local myNick = hub:myNick()
	local text = string.lower( message )
	if ( hub:isConnected() ) and ( myNick ~= sender ) then		
		if string.find( text, "[^a-z]bier[^a-z]" ) then
			hub:sendMain( "bier? ja lekker! :)" )
		end
	end
end

bierProxy = luajava.createProxy( "org.dccafe.dcwatch.plugins.lua.LuaEventHandlerInterface", bierEvents )
dcwatch:addEventHandler( "DCWatch Bier Script 0.2.5.061007", bierProxy )

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests