Could someone convert NewUserConnected() to DataArrival(), so it blocks a user immediatly without showing the MOTD?
--Requested by blackwings
--Made by nErBoS
sBot = "Hub-Security"
arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
} -- Put on this table all the prefix and nick you want to block
function Main()
end
function NewUserConnected(user)
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(sBot, "You are using a illegal prefix or nick.")
user:SendData(sBot, "Don't use "..arrBadNick[i].." in your nick")
user:Disconnect()
end
end
end
end
Hi,
Try this one...
--Requested by blackwings
--Change NewUserConnected to DataArrival
--Catch Data (thanks plop)
--Made by nErBoS
sBot = "Hub-Security"
arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
} -- Put on this table all the prefix and nick you want to block
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(user, data)
if (strsub(data, 1, 14 + strlen(user.sName)) == "$ValidateNick "..user.sName and not user.bOperator) then
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(sBot, "You are using a illegal prefix or nick.")
user:SendData(sBot, "Don't use "..arrBadNick[i].." in your nick")
user:Disconnect()
end
end
end
end
end
Best regards, nErBoS
you forgot 2 enable full data, without that the script will never get $ValidateNick.
plop
Hi,
Baaa, complety forgot about that, good that i have my plop-postfix :D Thanks plop :))
Script has been edit.
Best regards, nErBoS
ehm, it doesn't work Nerbos, even after you add the
"frmHub:EnableSearchData(1)"
try and change it with this one
frmHub:EnableFullData(1)
QuoteOriginally posted by Typhoon?
try and change it with this one
frmHub:EnableFullData(1)
It doesn't work with that either
Try this..
--Requested by blackwings
--Change NewUserConnected to DataArrival
--Catch Data (thanks plop)
--Made by nErBoS
sBot = "Hub-Security"
arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
} -- Put on this table all the prefix and nick you want to block
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(user, data)
if (strsub(data, 1, 8) == "$Version") and not user.bOperator then
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(sBot, "You are using a illegal prefix or nick.")
user:SendData(sBot, "Don't use "..arrBadNick[i].." in your nick")
user:Disconnect()
end
end
end
end
end
Hi,
If you permit me a little change :)
--Requested by blackwings
--Change NewUserConnected to DataArrival
--Catch Data (thanks plop)
--Fixed by Keep
--Made by nErBoS
sBot = "Hub-Security"
arrBadNick = {
"[OP]","(op)","[admin]","(admin)","[su]","(su)","[master]",
"(master)","[moderator]","(moderator)","[adm]","(adm)","[administrator]","(administrator)",
"[fc]","(fc)","[operator]","(operator)"
} -- Put on this table all the prefix and nick you want to block
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(user, data)
if (strsub(data, 1, 8) == "$Version") and not user.bOperator then
for i=1, getn(arrBadNick) do
if (strlen(user.sName) >= strlen(arrBadNick[i])) then
if (strsub(strlower(user.sName),1,strlen(arrBadNick[i])) == strlower(arrBadNick[i])) then
user:SendData(sBot, "You are using a illegal prefix or nick.")
user:SendData(sBot, "Don't use "..arrBadNick[i].." in your nick")
user:Disconnect()
end
end
end
end
end
Best regards, nErBoS
I don't see any difference between kepp's and nerbos last post. Anyway, I tested the one from Nerbos last post and it works :D
EDIT:
Could someone also make so the line that says "logged in" disapear?
QuoteOriginally posted by blackwings
I don't see any difference between kepp's and nerbos last post. Anyway, I tested the one from Nerbos last post and it works :D
He was reffering in the credits ;)
Hi,
Sharpe eye Herodes :)
About the "Loggin in." that is send by ptokax i don't belive that is possible to remove by script.
Best regards, nErBoS
QuoteOriginally posted by nErBoS
Hi,
Sharpe eye Herodes :)
About the "Loggin in." that is send by ptokax i don't belive that is possible to remove by script.
Best regards, nErBoS
Really, I tested with a IP blocker script a few days ago and even if you're regged, the "loggin in" doesn't show up. Or is it because the hub gets the IP first, then the rest of the information(which is logical :P ), so if a script blockes the IP, the rest of the information wont be sent, therefore there want be information about loggin in and and that's why the hub doesn't confirms that you're loggin in. Am I right?
Hi,
This is how data is send whe a user enters a Hub
[20:28] This hub is running PtokaX DC Hub 0.3.3.0 build 15.25 [debug] (UpTime: 0 days, 0 hours, 1 minutes)
[20:28] Mensagem privada de Data: $ValidateNick [op]nErBoS
[20:28] Mensagem privada de Data: $Version 1,0091
[20:28] Mensagem privada de Data: $GetNickList
[20:28] Mensagem privada de Data: $MyINFO $ALL [op]nErBoS <++ V:0.401,M:A,H:1/0/0,S:1>$ $DSL$nerbos@sapo.pt$0$
[20:28] Welcome to PtokaX
[20:28] Mensagem privada de Data: $GetINFO [op]nErBoS [op]nErBoS
In this case the Loggin in. didn't appear, maybe is because of the new version.
Best regards, nErBoS