it's possible to do a bot that with a command !inform sends a message to a user trought bot ....example:
message from OP: hello!
;)
Fast one..
sBot = "Botname"
function DataArrival(user, data)
if strsub(data,1,1)=="<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,who,msg=strfind(data,"%b<>%s+(%S+)%s+(%S+)%s*(.*)")
if (cmd=="!inform") then
if user.bOperator then
local victim = GetItemByName(who)
if victim == nil then
user:SendData(sBot,"*** "..who.." is not in the hub.") return 1
else
victim:SendPM(sBot,"Message from OP: "..msg)
user:SendData(sBot,"Message was sent to "..victim.sName) return 1
end
end
end
end
end
QuoteOriginally posted by kepp
Fast one..
sBot = "Botname"
function DataArrival(user, data)
if strsub(data,1,1)=="<" then
data=strsub(data,1,strlen(data)-1)
local s,e,cmd,who,msg=strfind(data,"%b<>%s+(%S+)%s+(%S+)%s*(.*)")
if (cmd=="!inform") then
if user.bOperator then
local victim = GetItemByName(who)
if victim == nil then
user:SendData(sBot,"*** "..who.." is not in the hub.") return 1
else
victim:SendPM(sBot,"Message from OP: "..msg)
user:SendData(sBot,"Message was sent to "..victim.sName) return 1
end
end
end
end
end
uhm... nice bot!...it is possible to add the name of the OP ?
example: Message from
: hello!