azurth Posted July 7, 2009 Author Share Posted July 7, 2009 how can i make it so that people cant create accounts with certain details eg. username cant contain certain words. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 7, 2009 Share Posted July 7, 2009 It would require editing the source code of the engine. Link to comment Share on other sites More sharing options...
Driocku Posted July 7, 2009 Share Posted July 7, 2009 Yea prolly change the thing in modHandleData on server named Packet_NewAccount to this, this only checks if the account is called a word not if it contains it, that would be a much longer code```Public Sub Packet_NewAccount(ByVal Index As Long, ByVal Username As String, ByVal Password As String, ByVal Email As String) If Not IsLoggedIn(Index) Then If LenB(Username) < 6 Then Call PlainMsg(Index, "Your username must be at least three characters in length.", 1) Exit Sub End If If LenB(Password) < 6 Then Call PlainMsg(Index, "Your password must be at least three characters in length.", 1) Exit Sub End If If Username = "Word" Then Call PlainMsg(Index, "Your username contains an inappropriate word, please change it and try again", 1) Exit Sub End If If EMAIL_AUTH = 1 Then If LenB(Email) = 0 Then Call PlainMsg(Index, "Your email address cannot be blank.", 1) Exit Sub End If End If If Not IsAlphaNumeric(Username) Then Call PlainMsg(Index, "Your username must consist of alpha-numeric characters!", 1) Exit Sub End If If Not IsAlphaNumeric(Password) Then Call PlainMsg(Index, "Your password must consist of alpha-numeric characters!", 1) Exit Sub End If If Not AccountExists(Username) Then Call AddAccount(Index, Username, Password, Email) Call PlainMsg(Index, "Your account has been created!", 0) Else Call PlainMsg(Index, "Sorry, that account name is already taken!", 1) End If End IfEnd Sub```Might be able to use a Do Until statement to check against multiple words but I'm kinda lazy Replace "Word" with the word you want to block make sure its in quotesmight also be able to do a function to checkCode to check if it contains a word```Public Sub Packet_NewAccount(ByVal Index As Long, ByVal Username As String, ByVal Password As String, ByVal Email As String) Dim num as Integer Dim StringToFind as String num = 0 StringToFind = "Word" If Not IsLoggedIn(Index) Then If LenB(Username) < 6 Then Call PlainMsg(Index, "Your username must be at least three characters in length.", 1) Exit Sub End If If LenB(Password) < 6 Then Call PlainMsg(Index, "Your password must be at least three characters in length.", 1) Exit Sub End If Do Until Mid(Username, num, LenB(StringToFind)) = StringToFind Or num = LenB(StringToFind) If Mid(Username, num, LenB(StringToFind)) = StringToFind Then Call PlainMsg(Index, "Your username contains an inappropriate word, please change it and try again", 1) Exit Sub End If Loop If EMAIL_AUTH = 1 Then If LenB(Email) = 0 Then Call PlainMsg(Index, "Your email address cannot be blank.", 1) Exit Sub End If End If If Not IsAlphaNumeric(Username) Then Call PlainMsg(Index, "Your username must consist of alpha-numeric characters!", 1) Exit Sub End If If Not IsAlphaNumeric(Password) Then Call PlainMsg(Index, "Your password must consist of alpha-numeric characters!", 1) Exit Sub End If If Not AccountExists(Username) Then Call AddAccount(Index, Username, Password, Email) Call PlainMsg(Index, "Your account has been created!", 0) Else Call PlainMsg(Index, "Sorry, that account name is already taken!", 1) End If End IfEnd Sub``` Link to comment Share on other sites More sharing options...
azurth Posted July 7, 2009 Author Share Posted July 7, 2009 well is there any way to send someone a message while they are offline so when they log in they recieve it. this way you can just look at the account list and see who has made an account that u dont want Link to comment Share on other sites More sharing options...
Driocku Posted July 7, 2009 Share Posted July 7, 2009 this ways much simpler though it prevents anyone from even making an account with the word in it,if you can't do it I could prolly do it for you just tell me the version of eclipse you need it done in Link to comment Share on other sites More sharing options...
emblem Posted July 7, 2009 Share Posted July 7, 2009 ```If InStr(Username, StringToFind) > 0 Then Call PlainMsg(Index, "Your username contains an inappropriate word, please change it and try again", 1) Exit SubEnd If``` Link to comment Share on other sites More sharing options...
Driocku Posted July 7, 2009 Share Posted July 7, 2009 hmm didn't know about that function/command thingy Link to comment Share on other sites More sharing options...
azurth Posted July 7, 2009 Author Share Posted July 7, 2009 btw ho do i go about writing/applying these scripts to eclipse. i am new to this and have no idea. Link to comment Share on other sites More sharing options...
Driocku Posted July 7, 2009 Share Posted July 7, 2009 you can't script this you need to edit the source Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 7, 2009 Share Posted July 7, 2009 You'd need to go to the main page, and download the source code of the engine.Then, you edit the engine with Visual Basic 6.I'm going to move this to the Source Questions board. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now