Clans

Approved Clans 1.2.1

No permission to download
elif command == "cleave":
id = Player.SteamID
if not self.HasClan(id):
Player.MessageFrom(self.SystemName, "You don't have a clan!")
return
rank = self.GetClanRank(id)
clan = self.GetClanOfPlayer(id)
lenn = self.GetClanPopulation(clan)
if lenn == 1:
self.DeleteClan(clan)
return
if rank == 4:
self.DeleteClan(clan)
else:
self.RemovePlayerFromClan(clan, id)
online = self.GetAllOnlinePlayersOfClan(clan)
name = Player.Name.replace('[' + clan + ']', '').strip(' ')
# Player.basePlayer.displayName = name
#ReflectionExtensions.SetFieldValue(Player.basePlayer, "_displayName", "[" + clan + "] " + name)
Player.Name = "[" + clan + "] " + name
for pl in online:
pl.MessageFrom("[" + clan + "]", name + " left the clan.")
if Player.SteamID in PlayersWhoAreInAClan.keys():
PlayersWhoAreInAClan.pop(Player.SteamID)
Player.MessageFrom(clan, "You left your clan.")


has to be

Player.Name = name ?
 
Last edited:
Clans interferes with IllegalName (http://fougerite.com/resources/illegalname.26/), if a clan name is too short (3 characters), the IllegalName will detect it and not allow those players to join. The reason I think that clans is the problem because its the way that the tag is identified, and other tags such as the Donators tags don't get this problem.
 
Clans interferes with IllegalName (http://fougerite.com/resources/illegalname.26/), if a clan name is too short (3 characters), the IllegalName will detect it and not allow those players to join. The reason I think that clans is the problem because its the way that the tag is identified, and other tags such as the Donators tags don't get this problem.
I figured it out, it is illegal names that caused the problem, fixed it by turning setting the protection to 2 in the config which doesn't look for spaces.
 
I'm missing a feature that only ASCII characters can be used for the Clan Name.

Or the best only a-z, A-Z and 0-9, characters

For example with:

Python:
if len(text) < 3 or len(text) > 10 or not re.match("[\w]+$", text) or not re.match('^[A-Za-z0-9]+$', text):
                Player.MessageFrom(self.SystemName, "Give 3-10 characters without spaces, A-Z,0-9 only.")
 
Last edited:
For some reason /cforcedel didnt work for me. It always said "Couldn't find!".

Edit:

It has to be:

if clanname.lower() == clan.lower():
 
  • Informative
Reactions: Jakkee