ULX

Author Topic: Protect ClanTag  (Read 5443 times)

0 Members and 1 Guest are viewing this topic.

Offline Avien

  • Full Member
  • ***
  • Posts: 168
  • Karma: 4
Protect ClanTag
« on: January 12, 2008, 10:15:15 AM »
Is it possible to get a feature implemented into the next ULX where you can protect clantags from being used from being not on a list?  Something along the lines of if you use a tag and you are not on the list, that person can either be set to be kicked, or change their name as defined by the config.

There is a mod out for TF2 right now called Beetlesmod, and this is just the feature that is needed.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Protect ClanTag
« Reply #1 on: January 12, 2008, 10:36:26 AM »
Yep, ULib has this feature builtin. Just set a password on your clantag.
Experiencing God's grace one day at a time.

Offline Avien

  • Full Member
  • ***
  • Posts: 168
  • Karma: 4
Re: Protect ClanTag
« Reply #2 on: January 12, 2008, 03:30:23 PM »
Could you explain a little more?  Where do i set a password for the clantag and where do i specify who has rights to the tag?

I read the email you sent my buddy.  So there is no way to automatically add the tag permission to the user in the user.txt?

Such as:
"user"   
{
   "deny"   
   {
   }
   "type"   "steamid"
   "groups"   
   {
      "superadmin"
   }
   "id"   "STEAM_0:0:XXXXXX"
   "pass"   ""
   "allow"   
   {
   "ClanTag" "XXX"   
        "immunity"
   }
}

It just seems like having to enter a password in a certain time can be a hassle for everyone involved.
« Last Edit: January 12, 2008, 03:33:49 PM by Avien »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Protect ClanTag
« Reply #3 on: January 12, 2008, 03:59:23 PM »
It just seems like having to enter a password in a certain time can be a hassle for everyone involved.

I'll let Megiddo explain further.
Your question peaked my curiosity though.

How would you propose protecting the tag?

Once set up, ULX will kick anyone who hasn't entered the password after X seconds if they don't send ULX the password command.
It's been a while since anyone asked about this feature, but it may even prevent them from spawning until the command is entered.
(Again, Megiddo is the one to clarify on this feature. It was in ULX long before spbogie and I joined the ranks)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Protect ClanTag
« Reply #4 on: January 12, 2008, 04:59:47 PM »
The only thing ULib has is a password or kick. It will let you spawn, but won't let you stay long.
Experiencing God's grace one day at a time.

Offline Avien

  • Full Member
  • ***
  • Posts: 168
  • Karma: 4
Re: Protect ClanTag
« Reply #5 on: January 12, 2008, 05:22:42 PM »
How would you propose protecting the tag?

There could be a file where if you want you can add clantag(s) to be protected.  Anyone not in this list that uses that tag or characters will be kicked after x seconds.  In order to use the tag, the people who are allowed will have their steamids put into this file.

Example:

File:ProtectClanTag.cfg
//This file will be used to protect clan tags and their members.
//If person is not in this list with steamid, they will be kicked after X seconds.
ProtectTag 0  //set to 1 to enable
SecondsBeforeKick 30

ProtectTag "Tag" "SteamID"  //This person will be allowed to use the tag


Something like that.  I am not sure how to write the code on the ulx side, but instead of asking for a password you would just pull the steamids from this file and if it is not there then kick.



Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Protect ClanTag
« Reply #6 on: January 12, 2008, 06:41:30 PM »
Though an interesting idea, I'm not sure yet one more place to store/keep up with SteamIDs matches our motto of striving for simplicity.

Megiddo, would adding a clantag field, and an addclan command, to the ULib.ucl/ULX be overly complicated?
What about perhaps extending the addgroup command?
 "ulx addgroup <group|clan> <inherit_from> <1/true if clantag to protect clan name/0 if not>"
"ulx adduser <clan|group> <user> <immunity>
Then rewrite the server player spawn/name change hook command/user access query to check the name of the player.
If the name of the player contains a group(that is actually a clan name) that is protected, it warns, timer kicks, etc.

A person can be a member of more than one group right now without inheriting, correct?
This way, not every clan member would have to have admin access. But you could later add a non-admin clan member(defaulting to "user" group access), to an admin group that inherited the user group)

I guess this is getting overly complicated for ULX/ULib. I do think it would make a great module though.

« Last Edit: January 12, 2008, 06:43:03 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Protect ClanTag
« Reply #7 on: January 12, 2008, 06:41:43 PM »
Let me ask you this. Are you using a different group for people that are allowed to wear the clan tag and those who are not?

I could write a simple module for you, that will check a players name on load and if it finds a string (clan tag) in their name but they are not in the specified group, it will 1.) kick them or 2.) change their name.

This way, you would just add the members of your clan to the group and then when they join the script will know they are allowed to wear the tag.



If this sounds acceptable to you, let me know what groups you are using that are allowed to use the tag, and I'll try my hand at spitting something out for you =)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Protect ClanTag
« Reply #8 on: January 12, 2008, 06:45:39 PM »
zakap, same idea as me basically. I was thinking it _might_ not be overly complicated for ULX addgroup to protect the name of the group, as long as the players could be added to other groups later and not have it forget the clan name group.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Avien

  • Full Member
  • ***
  • Posts: 168
  • Karma: 4
Re: Protect ClanTag
« Reply #9 on: January 12, 2008, 07:10:10 PM »
I like your ideas but the problem is that certain people wearing the tag are not all admins, etc...  There is no general group for the members.


Could it not be possible to make this module for the user group, but add in an immunity that can be added to the users.txt, or simply make people above the user group *aka:admin, superadmin, etc.* be immune from this kick?


In other words.  It will kick anyone that uses this so called tag, except for people that hold more power then the standard user.
« Last Edit: January 12, 2008, 07:12:57 PM by Avien »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Protect ClanTag
« Reply #10 on: January 12, 2008, 08:27:47 PM »
With my idea, you'd be adding clan members as a group name that had no other access. Only the "user" access that everyone has by default.
If it is as simple as I hope, we'd simply add a extra option to addgroup, that would place an indicator in the group attributes somewhere. Perhaps a new allow flag called "clan".
Code: [Select]
"uSyn|"
{
"deny"
{
}
"allow"
{
"clan"
}
"inherit_from"
{
}
}
IF ULX or ULIB were modified, the above would give them normal user rights, and the group allow "clan" flag would somehow tell ULX to warn/kick player if they weren't a member of that group and thier name included that groupname.
Megiddo/spbogie will have to post more if this is a total rewrite or overly complicated, or if making them admin later would cancel out the clan group. In my idea, I wouldn't want to have other groups inherit this one. I'd want the user to be able to have two groups.
Guys, will adduser overwrite original group, or add to it?

Ok, my light bulb is being switched off for now. I have to be up in 5 hours. Server maintenance. Sunday at 5am. Grrr.
« Last Edit: January 12, 2008, 08:29:54 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Protect ClanTag
« Reply #11 on: January 12, 2008, 08:34:10 PM »
to answer your question. yes.

ply:query("clantag") would detect if a user was allowed access to "clantag" in the user.txt file. You could write a module to check this flag on spawn. The users would have to have you give them this flag before they set their name.

JamminR, I think it would be neat if ULX could incorporate this into ULX, however not sure if or when it would be done. =)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Protect ClanTag
« Reply #12 on: January 12, 2008, 09:25:48 PM »
This is something that would be better as a module, since it would not get mainstream usage. :)
Experiencing God's grace one day at a time.

Offline ShaRose

  • Newbie
  • *
  • Posts: 6
  • Karma: 2
Re: Protect ClanTag
« Reply #13 on: January 20, 2008, 11:34:30 AM »
Actually it'd be really nice if you added a way to check for stuff in ULib.ucl.probe so that module wouldn't have to overwrite it, unless it used a think. For example, in UPA 1.2, I'm going to have password hashing protection, which needs another flag / command. I'm just adamant to override default ULib functions. Right now, if i use another flag, on join, say if it's a clantag, if that person has that tag, and the account is hashed, that person will automatically auth, because the password flag is empty. Which is bad. But yeah, secure clantags are possible with passwords. You can make them with upa 1.1 right now.

EDIT: Whoops, my bad. I've had it done but not released for too long, waiting for hashing to work.
« Last Edit: January 20, 2008, 11:40:09 AM by ShaRose »