Mercurial > hg > egg-tcls
comparison tj.tcl @ 628:eaf766018133
tj: If user deletes his or her default TJ ID, re-set the default to global default.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Feb 2021 10:44:46 +0200 |
parents | 319c2e73860c |
children | b7e3a47ed072 |
comparison
equal
deleted
inserted
replaced
627:f0b998b1716d | 628:eaf766018133 |
---|---|
450 return 1 | 450 return 1 |
451 } | 451 } |
452 | 452 |
453 tj_msg $upublic $unick $uchan "items_deleted" [list $uid $nitems] | 453 tj_msg $upublic $unick $uchan "items_deleted" [list $uid $nitems] |
454 | 454 |
455 # Check if we deleted the default ID | |
456 set udefid [tj_get_default_id $uhand] | |
457 if {[string tolower $uid] == [string tolower $udefid]} { | |
458 setuser $uhand XTRA "tj_default_id" $tj_default_id | |
459 | |
460 tj_msg $upublic $unick $uchan "default_reset" [list $uid $tj_default_id] | |
461 } | |
462 | |
455 } elseif {[tj_cmd_match "default" $rcmd]} { | 463 } elseif {[tj_cmd_match "default" $rcmd]} { |
456 # !tj default #<id> | 464 # !tj default #<id> |
457 # Check for #id prefix | 465 # Check for #id prefix |
458 if {![utl_arg_get $rarglist rindex rarg 0] || ![tj_get_id $rarg rindex uid]} { | 466 if {![utl_arg_get $rarglist rindex rarg 0] || ![tj_get_id $rarg rindex uid]} { |
459 tj_msg $upublic $unick $uchan "help_default" | 467 tj_msg $upublic $unick $uchan "help_default" |