hi , is my first request in here so will say it simple :=)
Wonder if its possible to have this feature, Set some Prefix users must have infront their nick so can join hub (multi-option maybe)
Would be nice to see it in some release :=) ;D
--[[
Prefix checker Lua5.1 API2 by ATAG
Messages are from "NICK CHECKING STUFF" by bastya_elvtars
]]
--// Setup start
-- Define what prefixes can be used.
-- Use just uppercase letters !!!
PrefixesNeeded = {
"[HUN]",
"(HUN)",
}
-- Values: 1 to disconnect, 2 to redirect
BadPrefixToDo = 1
-- redirect address ( see above )
RedirectAddress = "example.com:411"
--// Setup end
function OnStartup()
sBot = SetMan.GetString(21)
PrefixList = [[
====================
]] .. table.concat(PrefixesNeeded, " \r\n") .. [[
====================
Note that the check is _NOT_ case sensitive, a.k.a. [prefix] and [PREFIX] are equal.]]
end
function MyINFOArrival( user, data )
if user.iProfile > -1 or Core.GetUserValue( user, 9 ) then return end
local nick = user.sNick:upper()
if nick:find("PINGER") or nick:find("HUBLIST") then return end
for i, prefix in ipairs(PrefixesNeeded) do
if nick:sub( 1, #prefix ) == prefix then return end
end
if BadPrefixToDo ~= 2 then
Core.SendToUser(user,"<"..sBot.."> Bad/missing prefix, use one of these: "..PrefixList)
Core.Disconnect(user)
else
Core.Redirect(user, RedirectAddress, "Bad/missing prefix, use one of these: "..PrefixList)
end
end
i have set the prefix i want unreg users must have to login , but no result users can still connect without the prefix, any idea ATAG ( Yours i use ) ??
i get this error : Syntax error C:\Ptokax\scripts\Prefix.lua:43 attempt to call global 'ipirs' (a nil value)
fixed
i fix it , thanks for the script :D
Will test it for ops and vips join without tag hope it works :D
Also, please include option for 2+ prefixes, if not done already. In my hub, f. ex. boys have one prefix, girls have another one.