lua script

Asked by Vladimir

So i wrote a small script which blocking multi connect ..so only 1nick = 1 ip

local Exc ={ -- таблица исключений.
 ["[INT]district"] = true,
 ["nick"] = true,
}

function ValidateNickArrival(tUser)
 if not Exc[tUser.sNick] then
  for _,v in pairs(Core.GetOnlineUsers()) do
   if v.sIP==tUser.sIP then
    Core.SendToUser(tUser,"1NICK-1IP")
    Core.Disconnect(tUser)
   end
  end
 end
end
NewUserConnected=ValidateNickArrival
UserConnected=ValidateNickArrival
RegConnected=ValidateNickArrival
OpConnected=ValidateNickArrival

when i open the second dc client... hub all time write me 1NICK-1IP (it's ok) . BUT when a close my first client ...the second client not connected ....and wrote me 1NICK-1IP ... 1NICK-1IP ...where is my mistake ??? how to enter =)

Question information

Language:
English Edit question
Status:
Answered
For:
ADCH++ Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
iceman50 (bdcdevel) said :
#1

The bug tracker is only for bugs and submitting patches please redirect your comments to the adcportal forum under hubsoftware ... <http://www.adcportal.com/forums/viewforum.php?f=14>

Revision history for this message
iceman50 (bdcdevel) said :
#2

erm, my mistake but the message stays the same if you have dieas about scripts and the sort please take it to the URL provided in the topic that is related

Can you help with this problem?

Provide an answer of your own, or ask Vladimir for more information if necessary.

To post a message you must log in.