Hi I would like to request 1 or maybe 2 scripts for new API
One that checks all users signing in to see if their nick contains any letter not in english keyboard and if it does it will not allow them access to hub and Send them message that only English letter nicks allowed
Also one thats reads main chat and everytime someone types in a word not in english keyboard, i will not type it in but instead sends a pm back to user to user that says English only hub and so on
Happy New Year Everyone
Thankyou in advance
Try this:
sNickMsg = "Please correct your nickname, use just english letters in it."
sMsgMsg = "In the mainchat you can't use non-english characters."
ChatArrival = function(user, data)
if user.iProfile == -1 then
local _,_,msg = data:find("%b<>%s(.*)|")
if msg:find("[^%w]") then
Core.SendPmToUser(user,SetMan.GetString(21),sMsgMsg.."|")
end
end
end
UserConnected = function(user)
if user.iProfile == -1 then
if user.sNick:find("[^%w%[%]]") then
Core.SendPmToUser(user,SetMan.GetString(21),sNickMsg.."|")
end
end
end
And Happy New Year to You and Everybody Else :)
Thanks wow that was fast I'll try it and let you know how it works
Nope Does not work
still allowing these nicks in
?????13
????????
????????????
????
I need these kind of nicks not allowed into hub or allowed to speak in that language in main
i dont mind if they use it in pm to each other
Ok awesome Typhoon modified your script for me and now it works flawless
here it is
sNickMsg = "Please correct your nickname, use just english letters in it. use these characters. abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#&()<>+=_-"
sMsgMsg = "In the mainchat you can't use non-english characters. use these characters. abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#&()<>+=_-"
ChatArrival = function(user, data)
if user.iProfile == -1 then
local _,_,msg = data:find("%b<>%s(.*)|")
if not msg:find("[a-zA-Z0-9!@#&()<>+=_-]") then
Core.SendPmToUser(user,SetMan.GetString(21),sMsgMsg.."|")
return true
end
end
end
UserConnected = function(user)
if user.iProfile == -1 then
if not user.sNick:find("[a-zA-Z0-9!@#&()<>+=_-]") then
Core.SendPmToUser(user,SetMan.GetString(21),sNickMsg.."|")
Core.Disconnect(user.sNick)
return true
end
end
end
Thanks For the original Idea
Thanks Mutor
Quote"Does it? It appears than any English character in either nick or chat will null the trigger."
Your 100% right one user got in with a 61 added to his nick
Thanks for the revision
Happy New Year
For the most part the script is working but some still talk in main in non english
and script does not catch
like this Guy [RU] <D0Z0R> ??? ? ??
Don't want non english speaking in hub
Yes I am using your script and yes i use english characters
It does block i would say 99% of those characters ( ??? ? ?? )
but some do still talk like that in main so some do get through
could be another script might haver beem writting at same time. \
it does Happen.
Anyway its 99% effective and thats more than good enough for me
Thankyou for the Modification. :D
I wish more scripts could be that effective.
Man your awesome . I wish i could write script like you .
Thanks
only check non operators is fine
guests ,regs and vip
Yes i'm installing now very nice thanks again