hi all,i was wandering if some1 coult alter this script 4 me, i would like it so that any messages that r sent can be saved into a txt folder
-----------------------------
-- PM - Spy - Bot
-----------------------------
-- Commands:
--
-- #spy - Add user to Spy - List
-- #rem - Del user from Spy - List
--
-- Set BotName
BotName = "jay"
-- Set HubOwner / The one going to spy
SpyName = "(uk)jay"
iSpy = {}
function DataArrival(sUser,sData)
if strsub(sData, 1, 1) == "<" then
local _,_,cmd,arg = strfind(sData, "%b<>%s+(%S+)%s*(.*)%|")
if cmd == "#spy" and sUser.sName == SpyName then
local _,_,nick = strfind(arg, "(%S+)")
if nick then
if GetItemByName(nick) then
sUser:SendData(BotName, "User "..GetItemByName(nick).sName.." is added to Spy-List")
iSpy[GetItemByName(nick).sName] = 1
end
end
return 1
elseif cmd == "#rem" and sUser.sName == SpyName then
local _,_,nick = strfind(arg, "(%S+)")
if nick then
if iSpy[nick] then
sUser:SendData(BotName, "User "..nick.." is deleted to Spy-List")
iSpy[nick] = nil
end
end
return 1
end
elseif strsub(sData, 1, 4) == "$To:" then
local s,e,WhoTo,From,Msg = strfind(sData,"%$To:%s+(%S+)%s+From:%s+(%S+)%s+%$%b<>%s+(.*)%|")
if iSpy[From] then
SendPmToNick(SpyName, BotName, "From: "..From.." > "..Msg)
end
end
end
separate files by usernames or what?
opps sorry(still got hangover) yes plz m8 by username
QuoteOriginally posted by (uk)jay
opps sorry(still got hangover) yes plz m8 by username
i agree with Mutor, and by username its not recommended as some usernames contain chars that make Windows filesystems mad.
If you use another way, it will crash Ptokax in 5 mins due to RAM usage.
PMSpying={
[(uk)jay]={"hi","can you gimme slot?"},
}
this kills PtokaX
yes i totaly understand about PRIVATE, but my girlfriend as just recived an abusive pm from a user , all because she was d/l from him........ so all i was thinking of was a way to monitor somethin like this :)
bad word scanner in PM? hmmmm... good
why not just ban the user......
???????????????????????????
what are you going to do if you see an abbusive pm ???
Most All-In Scripts have a way of filtering bad words and acting in a way you choose either by.
replacing the bad words for something less abbousive or disconnecting the user.
Save your b/w and delete the script leave pm's as Private..
ok, advice taken and bot deleted, it was just an idea anyway.thx 4 the advice :)))
bad word scanner in pm!!! is there such a script??
hi m8 ...
this is Possibly one of the best stand alone ones ive Seen
Plops Word Replacer (http://www.plop.nl/ptokaxbots/Plop/word_replacer_1.1p.lua)
hi, thx for that and thx again for all your advice :)))