CorrectNickErrors:: ; 677e (1:677e) push bc push de ld b, MON_NAME_LENGTH .checkchar ld a, [de] cp "@" jr z, .done ld hl, .textcommands dec hl .loop inc hl ld a, [hl] cp $ff jr z, .next ld a, [de] cp [hl] inc hl jr c, .loop cp [hl] jr nc, .loop ld a, "?" ld [de], a jr .loop .next inc de dec b jr nz, .checkchar pop de push de ld a, "?" ld [de], a inc de ld a, "@" ld [de], a .done pop de pop bc ret .textcommands ; table defining which characters are actually text commands ; format: ; ≥ < db "", $04 + 1 db "", $18 + 1 db $1d, "%" + 1 db $35, "" + 1 db "", "" + 1 db $49, "" + 1 db "", "┘" + 1 db -1 ; end