From 0dd1c5330c87a3e5dee98c67d6445f9e39fa940a Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Fri, 7 Mar 2014 05:04:10 +0000 Subject: [PATCH] IRCC: update nick correctly. git-svn-id: svn://kolibrios.org@4617 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ircc/ircc.asm | 2 +- programs/network/ircc/serverparser.inc | 9 ++++++++- programs/network/ircc/userparser.inc | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/programs/network/ircc/ircc.asm b/programs/network/ircc/ircc.asm index 3041fe1118..ab6f0cef2e 100644 --- a/programs/network/ircc/ircc.asm +++ b/programs/network/ircc/ircc.asm @@ -13,7 +13,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -version equ '0.16' +version equ '0.17' ; connection status STATUS_DISCONNECTED = 0 diff --git a/programs/network/ircc/serverparser.inc b/programs/network/ircc/serverparser.inc index 10ab4289c1..97e65def30 100644 --- a/programs/network/ircc/serverparser.inc +++ b/programs/network/ircc/serverparser.inc @@ -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 diff --git a/programs/network/ircc/userparser.inc b/programs/network/ircc/userparser.inc index 406ae0f151..01f35f6469 100644 --- a/programs/network/ircc/userparser.inc +++ b/programs/network/ircc/userparser.inc @@ -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