1. These plugins are out of date or are no longer supported by their developers. If you wish to update a plugin, you must create a new topic (in the event that you aren't the original developer) in the submissions forum. If you wrote it, you can PM an admin or report the post to move it back, as long as you include updated information with the request/report.
    Dismiss Notice

ChangeName

Discussion in 'Unsupported / Outdated Plugins' started by Simon311, Feb 28, 2013.

  1. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Description:
    • Allows changing a player's name
    • Allows chatting from console rather than "broadcasting"
    Permissions:
    • changenames - Allows /chname
    • oldnames - Allows /oldname
    • selfname - Allows /selfname
    Commands:
    • /chname [player] [newname] - Changes [player]'s name to [newname]
    • /selfname [newname] - Changes your name to [newname]
    • /oldname [player] - Retrieves [player]'s old name
    • /chat [message] - Sends a usual chat message
    • Read "Usage" to have basic understanding of how all this works
    Usage:
    • /chname finds player by part of his name or by IX.
    • /chname accepts extra argument. If it is present (doesn't really matter what it is) - broadcast "[player] has changed [oldName]'s to [newName]" will NOT appear. (Example: /chname Someone Someone1 true or /selfname Tomato true )
    • /selfname can be used in console, that would change its name (default is Server) to a name you want. Then, you can execute commands just as if you were on the server, it will show the name you set.
    • You can actually "chat" from console using /chat . It will show the message as if you were on the server, useful with /selfname.
    • /chat works as if EnableChatAboveHeads=false, even if it is not
    Changelog:
    • v. 1.2.4 - API 1.16
    • v. 1.2.3 - API 1.15
    • v.1.2.2.7 - Another check to /selfname.
    • v.1.2.2.6 - Added some checks to /selfname. /chname still allows you to mess around in any way you want.
    • v.1.2.2 - ChatAboveHeads is now completely handled by TShock.
    • v.1.2.1 - Added tshock.canchat permission check for /all
    • v.1.2 - TShock 4.2 + HousingDistricts fix (the double-chat with House chat bug)
    • v.1.0.0.3 - Deprected extra argument for /selfname
    • v. 1.0.0.2 - Fixed Bug with ChatAboveHeads
    • v. 1.0.0.1 - Added ChatAboveHeads support
    Links:
    Fell free to post suggestions! :)
     
  2. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    well done and thanks for contributing!
     
  3. Olink

    Olink Nyx Developer, Occasional TShock Developer
    Banned

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    Explain again why you need three permissions? The whole point of permissions is to only assign it to groups that have access to the command...
     
  4. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Yea, the thing is that permissions are by default inherited from group to group, meaning that if group guest has access to /selfname, then group default would have it too, which might be inadvisable if /selfname is being used to let players change their names before they register or login (on servers with AllowLoginAnyUsername=false, in case a player's name is already registered). That of course can be fixed by switching off the inheriting, but who would do that just because of a plugin? That's y I created three permissions, so you could allow a guest to change his name, but disallow a registered user to do so, and then allow it back for admins, without switching off inheriting. If you don't use noselfname permission - then you don't need to use adminselfname either.
     
    • Like Like x 1
  5. Olink

    Olink Nyx Developer, Occasional TShock Developer
    Banned

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    groups have negated permissions which would override inheritance.
     
  6. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Thank you, did not know that
    Fixed
     
  7. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    I've been using this for a day now, works great. It's almost like an advanced /nick from Essentials. One request though, is there anyway you could have it save your nick when you log off?
     
  8. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Yeah, but not sure what to attach it to
    To login username?
     
  9. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    That's probably the best choice. IP wouldn't work very well (multiple accounts, multiple IP's, etc).
     
  10. Draxter

    Draxter Level 0

    Joined:
    Jan 8, 2012
    Messages:
    4
    Indeed, being able to save your 'changed', by tying it with the username, after someone logs in, new name is applied.

    Also, would be good to prevent two online people from having the same name, currently impersonating someone is possible.
     
  11. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,596
    Impersonation is the good thing about these plugins ;D
     
    • Like Like x 1
  12. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Well, like I already pointed out to you in GTalk, setting the permissions right would fix that.
    Add permission selfname to group guest, and then add permission !selfname to group default. And don't give permissions selfname / changenames to untrusted groups.
     
  13. k0rd

    k0rd Tee Shawk Developer
    TShock Admin

    Joined:
    Dec 22, 2011
    Messages:
    438
    Approved.
     
  14. DankBud

    DankBud Level 8

    Joined:
    Jul 23, 2011
    Messages:
    228
    I have a request. Rename Player if the char name has any invalid (non-ASCII) characters.
     
  15. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Are you referring to Rename Player plugin?
    I will try to port it / create a similar one.
     
  16. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Well, if you were referring to Rename Player plugin, then here you go: Plugin + Source.
    Ported to API 1.14, plus from now on it automatically creates config ;)
     
    • Like Like x 1
  17. Mc Fow1er

    Mc Fow1er Guest

    Does this work like a nickname for a player on the server?
     
  18. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    The name assigned by /selfname or /chname doesn't save on the clientside if that is what you mean (at least w/o SSC).
     
  19. Mc Fow1er

    Mc Fow1er Guest

    thats what i ment and thanks dude! ^^
     
  20. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    Is it possible to have a minimum character count? Currently, people can have no name by doing /selfname "". If there was a minimum character requirement, (say, if it was 3) they'd need to at least do something like /selfname "tom"