PtokaX forum

Lua 5.3/5.2/5.1 Scripts (for PtokaX 0.4.0.0 and newer) => Help with scripts => Topic started by: BrotherBear on 10 August, 2008, 16:00:46

Title: Remove Search of Main in "Lucifer 6.6.6 [build 2.2] - LUA 5.1x [Strict][API 2]"
Post by: BrotherBear on 10 August, 2008, 16:00:46
Hi!

I would like to remove the Search of Main in Lucifer, that we see anyway :)

I only want it to Search in PM.

Thanks in advance!
Title: Re: Remove Search of Main in "Lucifer 6.6.6 [build 2.2] - LUA 5.1x [Strict][API
Post by: Leun on 10 August, 2008, 17:12:43
You only need to replace:


ChatArrival = function(user,data)
local _,_, to = data:find("^$To:%s(%S+)%s+From:")
local _,_, msg = data:find("%b<>%s(.*)|$")
-- Message sent in Main or PM (except to Lucifer's Bot)
if (to and to ~= tSettings.sBot) or not to then
-- If user's profile is blocked and he advertised
if tSettings.tBlockedProfiles[user.iProfile] and PubCheck(user, msg, to) then
return true
end
end


into:


ChatArrival = function(user,data)
local _,_, to = data:find("^$To:%s(%S+)%s+From:")
local _,_, msg = data:find("%b<>%s(.*)|$")
-- Message sent in Main or PM (except to Lucifer's Bot)
if (to and to ~= tSettings.sBot) then
-- If user's profile is blocked and he advertised
if tSettings.tBlockedProfiles[user.iProfile] and PubCheck(user, msg, to) then
return true
end
end


Title: Re: Remove Search of Main in "Lucifer 6.6.6 [build 2.2] - LUA 5.1x [Strict][API 2]"
Post by: BrotherBear on 10 August, 2008, 18:22:58
Thanks Leun, that was the magic to fix this :)

Tested and it Worked =)