PDA

View Full Version : Player / Team name control


DanielC
5th January 2008, 02:56
Ok, so here's my question ... :)

Would it be possible to make an app capable of doing actions depending on players names?

My idea would be the following ... if player connects, and his/her display name has, say, the letters SPTR within it, the app checks a list of team members, if the name is a valid members name, the app does nothing, if the name is not a valid member, the app displays a message explaining that you need to be authorised to use the team name, and asks you politely to change your display name. The app then checks again, say, 1 minute later, and if the name is still present, the player gets kicked. It would be good if the app could check multiple servers, one after the other, say, every 1 minute. By display name, I literally mean display name, not the s2 username, as I'd like it to work in demo, s1 and s2.

I know it's not a bullet proof solution, but we often get people on our servers using our team name when they're not supposed to, thinking they can become members by just using the name, this would help guide them when an admin is not online, and also people pretending to be admins, like today we had a guy calling himself SPTR Stevo, bossing people around claiming to be an admin and generally being a pain in the arse for everybody, and giving our real [SPTR] Stevo! a bad reputation with our players. It's a real pain in the ass trying to monitor this, so the app I had in mind would at least prevent the real noobs from being on the servers for long ...

It sounds like a simple idea to me, and it might or might not be, certainly I'd be able to make such functions in php, but I have no idea how that would interface with LFS. I know bugger all about proper programming, and I don't want to spend years learning how to. If somebody could make such an app for me, I would be eternally grateful, and if there was anything I could do in return, I would, that is, of course, if it is possible to make such an app ...

Sorry for the long post ... :shrug:

greg_slideways
5th January 2008, 03:10
Ok, First off i love the idea! But i can see some issues with it! Such as would it limit just one team tag? And would there have to be a "database" to hold all names to check from? Aswell as would it bann or kick, Becuase you dont want them too come back , but you want them to change name and aloud to come back! But thats just a few things! Love the things it can do! ...And the one tag thing, i mean ONLY sptr or does it heve all tags used by all teams it might be a bit large! :thumb:

DanielC
5th January 2008, 03:28
Having a multi team databse, whilst it might sound good, would be too cumbersome, and would only lead to problems with people complaining about you bossing other teams around on your servers. I'm only interested in my own team, on my own servers, in that respect.

As for the name tags and members names, simply stock them in a .txt / .cfg file or something.

For example ...

/tag=SPTR

/members=[SPTR] Dan!, [SPTR] Stevo!, etc.

That way anybody could use it on their server for their team.
You don't need to complicate life, keep it simple and functional.

greg_slideways
5th January 2008, 03:33
OK , we agree that the multi tag is out..Hehe ok now how would you get it to recognize the tag?? (idk) but id think that tag/....w.e... / Might confuss the computer when a member often uses diff tags and names when they fool around or what not! Would it kick an admin for swithing his tag? aswell how would it identify a tag by itsself and not the wholemember name!?

DanielC
5th January 2008, 03:48
It's simply a string of characters to search in the players name.

Members list :

[SPTR] Dan!
[SPTR] Stevo!

String to look for :

SPTR (for example)

Result when players are checked :

Greg = does not have SPTR string, so ok, do nothing
SPTR Greg = has SPTR sting, doesn't match member list, so notice, then kick
[SPTR] Greg! = has SPTR sting, doesn't match member list, so notice, then kick
[SPTR] Dan! = has SPTR sting, matches member list, so ok, do nothing

If the app checks all the players every minute :

If I change my name in game from [SPTR] Dan! to Silly, no SPTR, so fine.
If I change my name in game from Silly to [SPTR] Dan!, in member list, so fine.
If I change my name in game from Silly to [SPTR] Greg!, fail, so notice then kick.

The longest you can stay on the server using the team tag is 2 minutes.
And you'll get the notice within the first minute ...

So anybody pretending to be an admin, will get called out eventually ...
It's more of an aid than a prevention system, as I said ...

greg_slideways
5th January 2008, 03:56
Ahh ok that made it more clear. Thank you! :thumb:

DanielC
5th January 2008, 03:59
Well, that's the idea anyway ... now all it needs is for somebody to make it actually work ... :D

greg_slideways
5th January 2008, 04:01
It can be a General app so all teams and servers can use it so i bet someone is willing to make it, Good luck! :thumb:

dougie-lampkin
5th January 2008, 13:31
Would it not be better to check for the tag string, and then check against a list of usernames? So that if your members mess around with their names, they can have any name? Either way its very do-able. I could make one, but it wouldn't be able to connect to multiple servers, it would stay connected to one. Do your servers have any insim apps running at the moment?

DanielC
5th January 2008, 13:43
Well if you could set the string to check as a variable, you could set it to check either the sheer text or the full tag, depending on personal preference. But checking the full tag would then miss people like I said above, using SPTR and not [SPTR]. Whilst that is obviously a failed attempt from out side, other players might not know the difference and still be fooled. Also, in SPTR, once you've chosen your name tag, you stick with it. But as I said, if it was variable, you could set it to check as you wish. As for insim connections, my servers are running LFSLapper, that's all. It's not a huge deal for the app to be able to check multiple servers, as long as I can run a copy of the app for each server.

dougie-lampkin
5th January 2008, 14:40
If I was doing it, it would be through insim. I don't think it would work alongside lapper...someone more talented then me could maybe check that?

MonkOnHotTinRoof
5th January 2008, 16:41
If I was doing it, it would be through insim. I don't think it would work alongside lapper...someone more talented then me could maybe check that?

I believe up to 8 independent insim clients can be attached to a host, so I see no problem with this. And the required application is very simple to do too.

dougie-lampkin
6th January 2008, 01:18
Ah well that's good :nod:

I was thinking...if all of the servers are run off one IP, how can you tell insim which one to connect to? I've only ever used 127.0.0.1 to connect to a single server...

flymike91
6th January 2008, 01:25
What about teams that use more than one tag for their team? Also are enough people pretending to be in [SPTR] to need this?

greg_slideways
6th January 2008, 01:30
Why in the world would you use more then one tag?????

DarkTimes
6th January 2008, 01:49
Ah well that's good :nod:

I was thinking...if all of the servers are run off one IP, how can you tell insim which one to connect to? I've only ever used 127.0.0.1 to connect to a single server...
Every server has a unique IP address, as does every computer which connects to the internet. The IP address 127.0.0.1 is a special 'loopback' address, which means your program is connecting to another program which is on the same machine. Connecting to 127.0.0.1, also known as 'localhost', means that you are connecting to your own computer... If you want to connect to a remote computer, you will need to know its unique IP. LFS can distinguish between different InSim programs at the same address because they each connect on different ports.

DanielC
6th January 2008, 02:40
how can you tell insim which one to connect to?
they each connect on different ports.
Yup, it's fairly simple really, as an example ...

127.0.0.1:29901
127.0.0.1:29902
127.0.0.1:29903

... and so on. 127.0.0.1 being the local computer, and 299** being each LFS servers unique insim port number.

Why in the world would you use more then one tag?????
I agree, how can one team use more than one tag?
If you're using more than one tag, you're not the same team, surely?

are enough people pretending to be in [SPTR] to need this?
I'd say on average we catch about 6 or 7 a week at it, mostly harmless people who just want to join us and don't know how to, or who simply don't realise that they have to tryout, and about 1 a week who really is a totally malicious idiot. That's the people we catch doing it, who knows when we're not there.

I'm requesting this app because I feel it would be very usefull for me, and may help one or two other people with similar problems. The app will guide the people who wish to join us by displaying a notice informing them of how to do so, as we are not on the servers 24/7 (yes, we all have jobs/school etc.), this is a great way to help people who are genuinely interested in the team, but never cross a real member, and to help prevent fakers. It also saves displaying huge amounts of text and rules when players connect to the server.

greg_slideways
6th January 2008, 02:43
Yes i hate large amount of text when opening server! And surely I want to ask will you implement it on every server you run! That will be alot of copys of the app?

DanielC
6th January 2008, 03:00
How the app is run depends on how the app is coded, if it's multi server or not.
Whichever way, it's not a problem, it's not like I'm lacking in server power ...
And yes, it will be run on all of the Silly Project LFS servers ...

mkinnov8
6th January 2008, 03:03
LFS Lapper (in its first instance) used to include a feature were you can tell it to recognise different players. It now uses licence names I believe. Ive not used lapper for a very long time, so I cannot be sure, but I remember some used to use it to give team members.. functions within servers etc..

Might be useful information to read/download lfs lapper..

dougie-lampkin
6th January 2008, 03:12
Thanks for the IP info, I've only ever ran insim apps from my pc, where the host was running aswell...I shall look into coding an app like this tomorrow (which is technically today I suppose :tilt: ) and report back...

DanielC
6th January 2008, 03:12
Might be useful information to read/download lfs lapper..
I need it to work in demo, s1 and s2, so something that uses players licence names is useless (for demo servers anyway, and demo is where the main problem is). My servers already run LFSLapper anyway, and I've seen no way of making LFSLapper doing what I described further up, unless I'm totally missing something ...

I shall look into coding an app like this tomorrow (which is technically today I suppose ) and report back...
Thanks dougie, much appreciated! :thumb:

dougie-lampkin
6th January 2008, 17:17
OK, at the moment I have it done (keep in mind it's only alpha testing) so that when an admin types !add NAME, a new file is created with that name. If someone connects with the string SPTR in their name, it searches for a file named after their name. If its found, it does nothing, if its not found, it tells them to change it.

I haven't done timers or anything yet, but at least the basic idea works...

Also, when a dedi host is running off a remote server, what path is it in? I don't need to know for this program, but are all the dedis running off the one path (eg. C:\dedi or C:\ or whatever drive letter...) ? I've often wondered this... :shrug:

EDIT: I've just thought of a problem...A player can still connect to the server with the name of one of your players (eg. a valid [SPTR] name) and it will appear as though they are a proper member...perhaps the file should contain the username of the SPTR member?

mcgas001
6th January 2008, 21:10
EDIT: I've just thought of a problem...A player can still connect to the server with the name of one of your players (eg. a valid [SPTR] name) and it will appear as though they are a proper member...perhaps the file should contain the username of the SPTR member?


Why not store playernames in the txt file and make a password box come up with LFS buttons, the pass is correct, tag is ok, pass is bad, kick...

dougie-lampkin
6th January 2008, 21:14
What I have is that when an admin types "!add NAME", a new file is made, which is named the NAME typed in the command...that's harder to explain than I thought... :shy: When someone connects with SPTR in their name, the program searches for a file called their name...if you follow me...if its there, it does nothing, the tag is allowed, if its not there, it tells them to change it...

I was then going to have it so that the only line of text in the player's file is their username, so that they can be checked...and if it's not the same username.../ban time :D

mcgas001
6th January 2008, 21:16
What I have is that when an admin types "!add NAME", a new file is made, which is named the NAME typed in the command...that's harder to explain than I thought... :shy: When someone connects with SPTR in their name, the program searches for a file called their name...if you follow me...if its there, it does nothing, the tag is allowed, if its not there, it tells them to change it...

I was then going to have it so that the only line of text in the player's file is their username, so that they can be checked...and if it's not the same username.../ban time :D

So potentially there will be like 100's of files floating around, are you mad? LOL

E: what you could do is, make a GUI or something and use LinQ with XML files, thats a very fast and easy option

greg_slideways
6th January 2008, 21:47
Yeah, it would be better to use usernames becuase as you stated they can change to [SPTR] DAN! While really its me and nothing happens. (not that id do it just an example) But yes usernames would be better imo!

dougie-lampkin
6th January 2008, 21:53
Erm...I don't know how to use LinQ, but I'll take a look at it now...OK, I now have a timer built-in, if the name isn't changed within 20 seconds (can be changed), the player is kicked. It needs a bit of fine-tuning though, maybe a few days to sort it out...

DarkTimes
7th January 2008, 19:29
Or you could just use a normal text file to store the names. One on each line. Very easy.

dougie-lampkin
7th January 2008, 19:38
Yea i just realised that earlier lolz :x
Dunno why I wanted to do it the first way...:shrug:

DanielC
9th January 2008, 13:13
Also, when a dedi host is running off a remote server, what path is it in? I don't need to know for this program, but are all the dedis running off the one path (eg. C:\dedi or C:\ or whatever drive letter...) ? I've often wondered this...
It can be anything really, it depends on how the server is setup and how tidy the Admin is, lol.

Here is an exple of how mine is layed out ...

C:\Serveur\LFS\Y\sp_demo\01\
C:\Serveur\LFS\Y\sp_demo\02\
C:\Serveur\LFS\Y\sp_s2\01\
C:\Serveur\LFS\Y\sp_s2\02\
... and so on ...

It's sorted into patch version, server type (Demo, S1, S2), and then the servers number.
So basically, each server has it's own folder, that contains everything relivant to that specific server.

Or you could just use a normal text file to store the names. One on each line. Very easy.
Yea, that would make life alot easier, then it'd be possible to edit the text file via php.
This would then make it possible to edit the configs with a web interface ...

I've just thought of a problem...A player can still connect to the server with the name of one of your players (eg. a valid [SPTR] name) and it will appear as though they are a proper member...perhaps the file should contain the username of the SPTR member?
The problem with using the username is that not all of our members have an S1 or S2 licence.

Why not store playernames in the txt file and make a password box come up with LFS buttons, the pass is correct, tag is ok, pass is bad, kick...
That's a brilliant idea! A general team access password would be a great solution. :thumb:

dougie-lampkin
9th January 2008, 19:06
Hmm, I'm having a problem with a timer spamming at me...

I have it set so that if someone connects with SPTR in there name and there not in the allowed list, it begins a 20000 ms timer. When the elapsed is fired, it searches for that name again. If it finds it, it sends 3 lines of instructions, and kicks. But, each time this happens, the 3 lines are repeated (so for the 3rd time, it sends the messages 3 times), but the kick comes after the 3 lines repeated...If you don't understand (its hard to explain...), reply back and I can show someone...I haven't really done timers much before, so I haven't had the problem before...

Apart from that, it looks quite do-able :)

DanielC
9th January 2008, 19:19
Does this way of doing it also detect when somebody changes their name - after - connecting to the server?

Also, the messages should be displayed when the timer starts, to give the player a chance to change name.
Then when the time ends, it simply kicks the player.

Unless you mean program / timer / insim instructions, in which case ignore what i just said ... :scratchch

Any chance of some screenshots? Might help explain ... :D

Thanks for spending the time on this, I hope you can figure out the problems.
I'd help, except as I said, I don't have a clue about programming, lol ...

dougie-lampkin
9th January 2008, 22:07
Does this way of doing it also detect when somebody changes their name - after - connecting to the server?

Also, the messages should be displayed when the timer starts, to give the player a chance to change name.
Then when the time ends, it simply kicks the player.

Unless you mean program / timer / insim instructions, in which case ignore what i just said ... :scratchch

Any chance of some screenshots? Might help explain ... :D

Thanks for spending the time on this, I hope you can figure out the problems.
I'd help, except as I said, I don't have a clue about programming, lol ...

Yes, it will detect name changes eventually, right now, I just want to get the basics done. A message is displayed when the timer starts to change the name. If, after 20 seconds, there is no improvement, it writes 3 lines of instructions, which say something like "dont rejoin until name is changed" or similar, I can't remember offhand...

I'll get screenshots soon enough, but I need someone to advise me on the timer first...I need to do some sort of timer.reset(); command, timer.stop(); and timer.enabled = false; (which do the same thing I think) are giving me trouble...

Swivel
15th January 2008, 08:55
I would love to test this if you want. Mine would be [LFSNZ] tag. We have 3 servers down here in NZ, and I really like the Idea to do this on my servers. This is if you dont mind

greg_slideways
15th January 2008, 20:17
Yes, it will detect name changes eventually, right now, I just want to get the basics done. A message is displayed when the timer starts to change the name. If, after 20 seconds, there is no improvement, it writes 3 lines of instructions, which say something like "dont rejoin until name is changed" or similar, I can't remember offhand...

I'll get screenshots soon enough, but I need someone to advise me on the timer first...I need to do some sort of timer.reset(); command, timer.stop(); and timer.enabled = false; (which do the same thing I think) are giving me trouble...

Have you worked this bug out ?? :thumb: :thumb:

dougie-lampkin
15th January 2008, 21:03
I would love to test this if you want. Mine would be [LFSNZ] tag. We have 3 servers down here in NZ, and I really like the Idea to do this on my servers. This is if you dont mind

I'd love a tester in maybe a week, it isn't fully ready yet...thanks for the offer :tilt:


Have you worked this bug out ?? :thumb: :thumb:

Nah, it always seems to happen, but the really weird thing is, I have it structured like this (pseudo-code):

Message
Message
Message
Kick

But it spams the messages without a kick in-between :really::schwitz:

On the test dedi it shows the 9 messages, but only one /kick command...

I really need someone to have a look at this for me...

:tit:

DarkTimes
15th January 2008, 21:10
I'll have a look at it, but you'd need to get your code to me somehow. :)

If you want my email, send me a PM.

Swivel
16th January 2008, 07:23
[quote=dougie-lampkin;677127]I'd love a tester in maybe a week, it isn't fully ready yet...thanks for the offer :tilt:


OK would be keen, Funny to be on the other side of the world, and helping out a fellow Irishman (FERMOY).

dougie-lampkin
16th January 2008, 19:28
OK, thanks to DarkTimes I'm back on-track :tilt:

avellis
16th January 2008, 19:44
Uhm, may I make a point?

LFSWorld already has information about teams! And its API (http://www.lfsforum.net/showthread.php?t=14480) already supports retrieving the teams list & team members.

So, all that there is to it, is the admin of a team keeping the members list up to date.

No?

dougie-lampkin
16th January 2008, 20:40
Uhm, may I make a point?

LFSWorld already has information about teams! And its API (http://www.lfsforum.net/showthread.php?t=14480) already supports retrieving the teams list & team members.

So, all that there is to it, is the admin of a team keeping the members list up to date.

No?

Yes, but only the big teams keep that teams page updated...and it doesn't work for demo servers...and it won't show the player's nickname...

My thingy, if it comes to light, will just require admins to type !add PLAYERNAME or similarly !remove PLAYERNAME to manage the team...

DanielC
2nd February 2008, 23:31
Soooo ... where are we with this now? :shrug:

dougie-lampkin
3rd February 2008, 00:06
I haven't been doing much on it recently I'm afraid...had some business to take care of :schwitz:

It's coming along, it just has some minor bugs to iron out...

greg_slideways
3rd February 2008, 00:38
I haven't been doing much on it recently I'm afraid...had some business to take care of :schwitz:

It's coming along, it just has some minor bugs to iron out...

What excatly are you afriad of? and do you need a tester or anything? :thumb: Glad to help in anyway that i can!

DanielC
3rd February 2008, 00:40
I haven't been doing much on it recently I'm afraid...
No problems, no rush, just wondering ... we all have other things to do ... :thumb:

Let me know if any progress is made, and if you need any testing done ... :)

do you need a tester or anything?
You're going to get far with no server arn't you ... :really:

greg_slideways
3rd February 2008, 00:48
Funny, Dan, but if you need anything ask! :)

dougie-lampkin
3rd February 2008, 01:11
Thanks for the offers, but I don't need any help...just haven't been working on it lately...