Hi,
I need a script to send a PM with command !pm.
For example - !pm
Thank you!!!!
hi m8
try this
-- pm-to by ??????Hawk??????
-- simple pm to bot
-- 28-01-2005
-- Command !pm
bot = "PM-to"
function Main()
frmHub:RegBot(bot)
end
function DataArrival(user, data)
if strsub(data,1,1) == "<" then
data = strsub(data, 1, (strlen(data)-1))
local s,e,command,sUser,msg = strfind(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
??????Hawk??????
hi m8
try this .. i dont know if it will work as ive got no way of testing it..
but hopefully someone who can test it will maby help you ...
-- pm-to by ??????Hawk??????
-- simple pm to bot
-- 28-01-2005
-- Command !pm
bot = "PM-to"
function Main()
frmHub:RegBot(bot)
end
function DataArrival(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
you may want to try using this function instead of DataArrival
ChatArrival(user, data)
??????Hawk??????
Hi,
thank you very much for your scripts!!!
But I have one request up to you.
Can you give me or convert, the !pm script in Lua 5?, because I have new PtokaX in betatest and the this script didn't work.
Thank you in advance!
"new ptokax" define new
QuoteOriginally posted by Quattro
"new ptokax" define new
New PtokaX -> PPK's PtokaX devel build ;)
OK I test your convert script Mutor.
And thank you very much Mutor!
try /pm [message]
build-in dc++.
plop