-- pm-to by ??????Hawk??????
-- simple pm to bot
-- 28-01-2005
--## Converted in LUA 5 by 6Marilyn6Manson6 at 06/05/2005
-- Command !pm
bot = "PM-to"
function Main()
frmHub:RegBot(bot)
end
function ChatArrival(user, data)
if string.sub(data,1,1) == "<" then
data = string.sub(data, 1, (string.len(data)-1))
local s,e,command,sUser,msg = string.find(data, "%b<>%s+(%S+)%s*(%S*)%s*(.*)")
if command == "!pm" then
if sUser ~= nil and msg ~= nil then
SendToNick(sUser, "$To: "..sUser.." From: "..bot.." $<"..bot.."> "..msg)
return 1
else
user.SendData(bot,"Command is !pm [user] [text]")
return 1
end
end
end
end
c ya
Whit function ChatArrival you can delete this string:
---> if string.sub(data,1,1) == "<" then