PtokaX forum

Development Section => Your Developing Problems => Topic started by: Dj_OcTaGoN on 01 October, 2004, 13:37:42

Title: Send Pm to specified Nick
Post by: Dj_OcTaGoN on 01 October, 2004, 13:37:42
Hello

How can i make any Bot sending PM to specified Operator instead of OpChat/PmToOps?

Like this one, sending to OpChat:

--Clone Alert 1.0
--by Mutor The Ugly
--PM Clone login to Opchat
--
--
OpChatName = frmHub:GetOpChatName() --Use this line for inbuilt Px opchat
 
function Main()
frmHub:EnableFullData(1)
end

function DataArrival(curUser,sdata)
local _,_, user1 = strfind(sdata,"$GetINFO%s+(%S+)%s+")
if user1 ~= curUser.sName then
user1 = GetItemByName(user1)


if user1 ~= nil then
if user1.sIP == curUser.sIP    then
SendPmToOps(OpChatName, "*** The Cloned user "..curUser.sName.." was warned and disconnected, A user that looks responsible to all this is : "..user1.sName)
curUser:TempBan()
end
end
end
end


cheers // Dj_OcTaGoN
Title:
Post by: Dj_OcTaGoN on 02 October, 2004, 12:36:57
Thank you very much!  :D
Title:
Post by: NightLitch on 02 October, 2004, 23:00:28
you don't need to register bot when using

SendPmToNick(to, from, text)

curUser:SendPM(from, text)

you need it...