From bed902bcfdb7baad1231ff44cb55d6b942c88cb7 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 25 Feb 2014 22:18:36 +0000 Subject: [PATCH] IRCC: Dont skip all colons when searching for string, only skip one. Fixed KICK servercommand. git-svn-id: svn://kolibrios.org@4595 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ircc/gui.inc | 2 +- programs/network/ircc/serverparser.inc | 48 +++++++++++++++++--------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/programs/network/ircc/gui.inc b/programs/network/ircc/gui.inc index 2a9405b008..d713f2b6f2 100644 --- a/programs/network/ircc/gui.inc +++ b/programs/network/ircc/gui.inc @@ -128,7 +128,7 @@ draw_window: ; Completely redraw the window, recalculate all coordinates and ; draw editbox mov eax, [ysize] - sub eax, 12 ;;;;;; + sub eax, 13 ;;;;;; mov [edit1.top], eax mov eax, [xsize] diff --git a/programs/network/ircc/serverparser.inc b/programs/network/ircc/serverparser.inc index 88f4684549..10ab4289c1 100644 --- a/programs/network/ircc/serverparser.inc +++ b/programs/network/ircc/serverparser.inc @@ -121,7 +121,7 @@ compare_to_nick: align 4 skip_parameter: -; First: skip the parameter +; First: skip the parameter (scan untill space or colon) .part1: lodsb cmp al, ' ' @@ -129,19 +129,28 @@ skip_parameter: cmp al, ':' jne .part1 -; Now, skip all trailing spaces and semicolons +; Skip all trailing spaces + .part3: + lodsb + cmp al, ' ' + je .part3 + dec esi + ret + +; Now, skip all trailing spaces and first semicolon .part2: lodsb cmp al, ' ' je .part2 cmp al, ':' - je .part2 + je .part3 dec esi - ret + + cmd_324: cmd_329: cmd_328: @@ -708,18 +717,15 @@ cmd_kick: cmp byte [esi+4], ' ' jne .fail add esi, 5 ; skip 'KICK ' -; Is it me who got kicked? - mov edi, servercommand+1 - call compare_to_nick - jne .not_me -; TODO: mark channel as disconnected +; TODO: Is it me who got kicked? +; if so, mark channel as disconnected .not_me: ; find the channel user has been kicked from push esi - call skip_parameter call window_open + push esi if TIMESTAMP call print_timestamp @@ -728,17 +734,25 @@ cmd_kick: mov esi, kick_header call print_text2 + pop eax + mov dl, ' ' + call print_text + + mov esi, str_kicked + call print_text2 + + pop eax + mov dl, ' ' + call print_text2 + + mov esi, str_by + call print_text2 + mov eax, servercommand+1 mov dl, '!' call print_text - mov esi, kicked - call print_text2 - - pop esi - call print_text2 - - mov esi, str_newline + mov esi, str_dotnewline call print_text2 mov ebx, [window_print]