forked from KolibriOS/kolibrios
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
|
||||
STATUS_DISCONNECTED = 0
|
||||
|
@ -640,8 +640,10 @@ cmd_nick:
|
||||
call compare_to_nick
|
||||
jne .not_me
|
||||
|
||||
; Yup, update user_nick
|
||||
mov ecx, MAX_NICK_LEN-1
|
||||
mov esi, [esp]
|
||||
mov edi, user_nick
|
||||
@@:
|
||||
lodsb
|
||||
test al, al
|
||||
@ -652,6 +654,8 @@ cmd_nick:
|
||||
je @f
|
||||
cmp al, 13
|
||||
je @f
|
||||
cmp al, ':'
|
||||
je @r
|
||||
stosb
|
||||
dec ecx
|
||||
jnz @r
|
||||
@ -660,6 +664,7 @@ cmd_nick:
|
||||
stosb
|
||||
.not_me:
|
||||
|
||||
; Update in userlist
|
||||
mov ebx, windows
|
||||
mov ecx, MAX_WINDOWS
|
||||
.window_loop:
|
||||
@ -675,6 +680,7 @@ cmd_nick:
|
||||
mov esi, [esp + 8]
|
||||
call user_add
|
||||
|
||||
; And print a notification in the channel
|
||||
mov [window_print], ebx
|
||||
|
||||
if TIMESTAMP
|
||||
@ -697,6 +703,7 @@ cmd_nick:
|
||||
mov esi, str_newline
|
||||
call print_text2
|
||||
|
||||
; Now do this for all open windows
|
||||
.next_window:
|
||||
pop ebx ecx
|
||||
add ebx, sizeof.window
|
||||
@ -743,7 +750,7 @@ cmd_kick:
|
||||
|
||||
pop eax
|
||||
mov dl, ' '
|
||||
call print_text2
|
||||
call print_text
|
||||
|
||||
mov esi, str_by
|
||||
call print_text2
|
||||
|
@ -19,7 +19,7 @@ user_parser:
|
||||
mov eax, [edit1.size]
|
||||
test eax, eax
|
||||
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 ?
|
||||
je server_command
|
||||
@ -285,6 +285,7 @@ cmd_usr_nick:
|
||||
cmp [socketnum], 0
|
||||
je .dontsend
|
||||
|
||||
; Request nickname change to server
|
||||
mov dword[usercommand+1], 'NICK'
|
||||
mov esi, [edit1.size]
|
||||
mov word[usercommand + esi], 0x0a0d
|
||||
@ -295,6 +296,7 @@ cmd_usr_nick:
|
||||
|
||||
ret
|
||||
|
||||
; We arent logged in yet, directly change user_nick field and print notification to user.
|
||||
.dontsend:
|
||||
mov ecx, MAX_NICK_LEN
|
||||
mov esi, usercommand+6
|
||||
|
Loading…
Reference in New Issue
Block a user