Author Topic: Need conversion of OpSecurity 0.1 to the new API  (Read 2696 times)

0 Members and 1 Guest are viewing this topic.

Offline ThugLife

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Need conversion of OpSecurity 0.1 to the new API
« on: 25 January, 2008, 21:10:49 »
Code: Lua
  1. -- OpSecurity 0.1 Lua5
  2. -- Small Op Account Protection script
  3. -- by ']['yphoon?
  4. -- thx to American Idiot for helping me when being blind/stupid
  5. -- write dynip to disable the check on the user
  6.  
  7. tSetup={}
  8. tSetup.Bot = "botname"
  9. tSetup.Email = "secured@net.nl"
  10. tSetup.OpSecurity = {
  11.         ["nick"] = "IP",
  12.         ["nick"] = "IP",
  13.         }
  14.  
  15.  
  16. function OpConnected(user)
  17.         if tSetup.OpSecurity[user.sName] then
  18.                 local Name = user.sName
  19.                 if ((tSetup.OpSecurity[Name] == user.sIP) or (tSetup.OpSecurity[Name] == "dynip")) then
  20.                         user:SendPM(tSetup.Bot,"You have passed the IP-Check !")
  21.                 else
  22.                         local msg = ""
  23.                         msg = msg.."\r\n\t\tВие бяхте банн'ат защото се правите на голям 'Haker'(opitai toq nomer v nqkoi dr hub)"
  24.                         msg = msg.."\r\n\t\tНямате право да използвате този ник,за това"
  25.                         msg = msg.."\r\n\t\tYOU HAVE BEEN BANNED BITCH!!! "..tSetup.Email
  26.                         user:SendData(tSetup.Bot,msg)
  27.                         user:Ban()
  28.                         Unban(Name)
  29.                 end
  30.         end
  31. end
« Last Edit: 26 January, 2008, 00:42:05 by bastya_elvtars »
Skype: galin93

PtokaX forum

Need conversion of OpSecurity 0.1 to the new API
« on: 25 January, 2008, 21:10:49 »

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: Need conversion of OpSecurity 0.1 to the new API
« Reply #1 on: 26 January, 2008, 05:22:59 »
Try this:
Code: [Select]
-- OpSecurity 0.1 Lua5
-- Small Op Account Protection script
-- by ']['yphoon?
-- thx to American Idiot for helping me when being blind/stupid
-- write dynip to disable the check on the user

tSetup={}
tSetup.Bot = "botname"
tSetup.Email = "secured@net.nl"
tSetup.OpSecurity = {
["nick"] = "IP",
["nick"] = "IP",
}

function OnStartup()
  Core.RegBot(tSetup.Bot,"","",true)
end

function OpConnected(user)
if tSetup.OpSecurity[user.sNick] then
local Name = user.sNick
if ((tSetup.OpSecurity[Name] == user.sIP) or (tSetup.OpSecurity[Name] == "dynip")) then
Core.SendPmToNick(user.sNick,tSetup.Bot,"You have passed the IP-Check !")
else
local msg = ""
msg = msg.."\r\n\t\t??? ????? ????'?? ?????? ?? ??????? ?? ????? 'Haker'(opitai toq nomer v nqkoi dr hub)"
msg = msg.."\r\n\t\t?????? ????? ?? ?????????? ???? ???,?? ????"
msg = msg.."\r\n\t\tYOU HAVE BEEN BANNED BITCH!!! "..tSetup.Email
Core.SendToNick(user.sNick,"<"..tSetup.Bot.."> "..msg)
BanMan.Ban(user,"","",true)
BanMan.Unban(Name)
end
end
end
Thanking You,

speedX

PtokaX forum

Re: Need conversion of OpSecurity 0.1 to the new API
« Reply #1 on: 26 January, 2008, 05:22:59 »