IRCC: update nick correctly.

git-svn-id: svn://kolibrios.org@4617 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2014-03-07 05:04:10 +00:00
parent e0dba7c238
commit 0dd1c5330c
3 changed files with 12 additions and 3 deletions

View File

@ -13,7 +13,7 @@
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
version equ '0.16' version equ '0.17'
; connection status ; connection status
STATUS_DISCONNECTED = 0 STATUS_DISCONNECTED = 0

View File

@ -640,8 +640,10 @@ cmd_nick:
call compare_to_nick call compare_to_nick
jne .not_me jne .not_me
; Yup, update user_nick
mov ecx, MAX_NICK_LEN-1 mov ecx, MAX_NICK_LEN-1
mov esi, [esp] mov esi, [esp]
mov edi, user_nick
@@: @@:
lodsb lodsb
test al, al test al, al
@ -652,6 +654,8 @@ cmd_nick:
je @f je @f
cmp al, 13 cmp al, 13
je @f je @f
cmp al, ':'
je @r
stosb stosb
dec ecx dec ecx
jnz @r jnz @r
@ -660,6 +664,7 @@ cmd_nick:
stosb stosb
.not_me: .not_me:
; Update in userlist
mov ebx, windows mov ebx, windows
mov ecx, MAX_WINDOWS mov ecx, MAX_WINDOWS
.window_loop: .window_loop:
@ -675,6 +680,7 @@ cmd_nick:
mov esi, [esp + 8] mov esi, [esp + 8]
call user_add call user_add
; And print a notification in the channel
mov [window_print], ebx mov [window_print], ebx
if TIMESTAMP if TIMESTAMP
@ -697,6 +703,7 @@ cmd_nick:
mov esi, str_newline mov esi, str_newline
call print_text2 call print_text2
; Now do this for all open windows
.next_window: .next_window:
pop ebx ecx pop ebx ecx
add ebx, sizeof.window add ebx, sizeof.window
@ -743,7 +750,7 @@ cmd_kick:
pop eax pop eax
mov dl, ' ' mov dl, ' '
call print_text2 call print_text
mov esi, str_by mov esi, str_by
call print_text2 call print_text2

View File

@ -285,6 +285,7 @@ cmd_usr_nick:
cmp [socketnum], 0 cmp [socketnum], 0
je .dontsend je .dontsend
; Request nickname change to server
mov dword[usercommand+1], 'NICK' mov dword[usercommand+1], 'NICK'
mov esi, [edit1.size] mov esi, [edit1.size]
mov word[usercommand + esi], 0x0a0d mov word[usercommand + esi], 0x0a0d
@ -295,6 +296,7 @@ cmd_usr_nick:
ret ret
; We arent logged in yet, directly change user_nick field and print notification to user.
.dontsend: .dontsend:
mov ecx, MAX_NICK_LEN mov ecx, MAX_NICK_LEN
mov esi, usercommand+6 mov esi, usercommand+6