.BANCHO. Log username changes to user notes in RAP
This commit is contained in:
parent
8f156a0702
commit
22ae4c332b
|
@ -6,6 +6,7 @@ from objects import glob
|
|||
|
||||
def handleUsernameChange(userID, newUsername, targetToken=None):
|
||||
try:
|
||||
userUtils.appendNotes(userID, "-- Username change: '{}' -> '{}'".format(userUtils.getUsername(userID), newUsername))
|
||||
userUtils.changeUsername(userID, newUsername=newUsername)
|
||||
if targetToken is not None:
|
||||
targetToken.kick("Your username has been changed to {}. Please log in again.".format(newUsername), "username_change")
|
||||
|
|
Loading…
Reference in New Issue
Block a user