i posted this in the DCDM++ thread but i realized should have been here..
well..
Quotei've been modding the bier.lua that comes with dcdm++ a little.. so that it responds on my nick instead.. i want to use it as an awaymessage :)
but sadly im not so skilled at this and has just begun modding scripts..
so what i wanted to hear whas if someone could help me so that it only triggers if my status is away ?..
like in pm.. but in main :)
--// vim:ts=4:sw=4:noet
--// ritard.lua -- Send reply when away
dcpp:setListener( "chat", "ritard",
function( hub, user, text )
local s = string.lower( text )
if string.find( s, "[^a-z]ritard+[^a-z]" ) or string.find( s, "[^a-z]ritard[^a-z]" )or string.find( s, "ritard" ) then
hub:sendChat( "jag ?r inte h?r -awaymessage" )
end
end
)
DC():PrintDebug( " ** Loaded ritard.lua **" )