English speaking only hub
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

English speaking only hub

Started by Hemarr, 31 December, 2007, 15:19:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hemarr

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 EveryoneThankyou in advance

Thor

#1
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 :)

Hemarr

Thanks wow that was fast  I'll try it and let you know how it works

Hemarr

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

Hemarr

#4
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

Hemarr

#5
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

Hemarr

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

Hemarr

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.

Hemarr

Man your awesome . I wish i could write script like you .

Thanks

only check non operators is fine
guests ,regs and vip

Hemarr

Yes i'm installing now very nice thanks again

SMF spam blocked by CleanTalk