@@ -229,21 +229,28 @@ core.register_chatcommand("setpassword", {
229
229
if not toname then
230
230
return false , " Name field required"
231
231
end
232
- local actstr = " ?"
232
+ local act_str_past = " ?"
233
+ local act_str_pres = " ?"
233
234
if not raw_password then
234
235
core .set_player_password (toname , " " )
235
- actstr = " cleared"
236
+ act_str_past = " cleared"
237
+ act_str_pres = " clears"
236
238
else
237
239
core .set_player_password (toname ,
238
240
core .get_password_hash (toname ,
239
241
raw_password ))
240
- actstr = " set"
242
+ act_str_past = " set"
243
+ act_str_pres = " sets"
241
244
end
242
245
if toname ~= name then
243
246
core .chat_send_player (toname , " Your password was "
244
- .. actstr .. " by " .. name )
247
+ .. act_str_past .. " by " .. name )
245
248
end
246
- return true , " Password of player \" " .. toname .. " \" " .. actstr
249
+
250
+ core .log (" action" , name .. " " .. act_str_pres
251
+ .. " password of " .. toname .. " ." )
252
+
253
+ return true , " Password of player \" " .. toname .. " \" " .. act_str_past
247
254
end ,
248
255
})
249
256
@@ -257,6 +264,9 @@ core.register_chatcommand("clearpassword", {
257
264
return false , " Name field required"
258
265
end
259
266
core .set_player_password (toname , ' ' )
267
+
268
+ core .log (" action" , name .. " clears password of " .. toname .. " ." )
269
+
260
270
return true , " Password of player \" " .. toname .. " \" cleared"
261
271
end ,
262
272
})
0 commit comments