mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-28 19:53:12 +03:00
IRCC: update nick correctly.
git-svn-id: svn://kolibrios.org@4617 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e0dba7c238
commit
0dd1c5330c
@ -13,7 +13,7 @@
|
|||||||
;; ;;
|
;; ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
version equ '0.16'
|
version equ '0.17'
|
||||||
|
|
||||||
; connection status
|
; connection status
|
||||||
STATUS_DISCONNECTED = 0
|
STATUS_DISCONNECTED = 0
|
||||||
|
@ -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
|
||||||
|
@ -19,7 +19,7 @@ user_parser:
|
|||||||
mov eax, [edit1.size]
|
mov eax, [edit1.size]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .ret ; ignore empty commands
|
jz .ret ; ignore empty commands
|
||||||
mov word [usercommand + eax], 0x0a0d ; terminate the line
|
mov word[usercommand + eax], 0x0a0d ; terminate the line
|
||||||
|
|
||||||
cmp byte[usercommand], '/' ; is it a server command ?
|
cmp byte[usercommand], '/' ; is it a server command ?
|
||||||
je server_command
|
je server_command
|
||||||
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user