Author Topic: Opsecurity  (Read 2773 times)

0 Members and 1 Guest are viewing this topic.

Offline the-master

  • Triple Ace
  • **
  • Posts: 220
  • Karma: +10/-15
Opsecurity
« on: 20 February, 2008, 17:11:12 »
Code: [Select]
-- OpSecurity 0.1 Lua5 modded by The-master for use in new API
-- 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
UserIP = {}
tSetup = {}
sBot = SetMan.GetString(21)
tSetup.Email = "secured@net.nl"
tSetup.OpSecurity = {
["[NL]-Harrie"] = "10.0.0.3",
["![DFA-Ma][NL]-Harrie"] = "10.0.0.3",
}
OpConnected = function(user)
CheckUser(user)
end


CheckUser = function(user)
UserIP[user.sNick] = {user.sIP}
if tSetup.OpSecurity[user.sNick] then
Core.SendToNick(user.sNick,"<"..sBot.."> Your IP will be checked")
local Name = user.sNick
if ((tSetup.OpSecurity[Name] == user.sIP) or (tSetup.OpSecurity[Name] == "dynip")) then
local msg = "Welcome "..user.sNick.." your IP Address: [ "..user.sIP..
" ] matches with your known ip."
Core.SendToNick(user.sNick,"<"..sBot.."> "..msg)
else
local msg = ""
msg = msg.."\r\n\t\tYou Have Been Banned For Using A Op Account That Don't Belong To You"
msg = msg.."\r\n\t\tIf YOU really are an Operator at this hub,and just got a new Ip"
msg = msg.."\r\n\t\tThen Mail to this address "..tSetup.Email
Core.SendToNick(user.sNick,"<"..sBot.."> "..msg)
return Core.Kick(user,sBot,"IP: [ "..user.sIP.." ] is out of range"), true
end
end
end
keep on sharing :)
dchub://kickincountryhub.no-ip.org

PtokaX forum

Opsecurity
« on: 20 February, 2008, 17:11:12 »

Offline Aragorn

  • Member
  • ***
  • Posts: 31
  • Karma: +2/-0
Re: Opsecurity
« Reply #1 on: 20 October, 2008, 01:39:46 »
[02:37] Syntax [string "-- OpSecurity 0.1 Lua5 modded by The-master..."]:8: attempt to index global 'SetMan' (a nil value)
ara

Offline Aragorn

  • Member
  • ***
  • Posts: 31
  • Karma: +2/-0
Re: Opsecurity
« Reply #2 on: 20 October, 2008, 03:48:29 »
well that is the problem. I cannot start the script cause of that error. and I do not have activated the option to stop script on error
ara

Offline Aragorn

  • Member
  • ***
  • Posts: 31
  • Karma: +2/-0
Re: Opsecurity
« Reply #3 on: 20 October, 2008, 03:58:20 »
I am using PtokaX 0.4.1.1
ara

Offline Aragorn

  • Member
  • ***
  • Posts: 31
  • Karma: +2/-0
Re: Opsecurity
« Reply #4 on: 20 October, 2008, 11:16:08 »
ohh yeah that was the problem. when started the hub and loaded script it worked. thank you again. I've been kind of a stress in the last days :)
ara

PtokaX forum

Re: Opsecurity
« Reply #4 on: 20 October, 2008, 11:16:08 »