From fe80b4429cd8a37280387a2d1cd3ca6a860464e1 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 12 Oct 2017 20:38:22 +0000 Subject: [PATCH] IRC client: strip username prefixes when opening a private chat window git-svn-id: svn://kolibrios.org@7090 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ircc/ircc.asm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/programs/network/ircc/ircc.asm b/programs/network/ircc/ircc.asm index 18b329f592..201477d12b 100644 --- a/programs/network/ircc/ircc.asm +++ b/programs/network/ircc/ircc.asm @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;; IRC client for KolibriOS ;; @@ -13,7 +13,7 @@ ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -version equ '0.29' +version equ '0.30' ; connection status STATUS_DISCONNECTED = 0 @@ -293,6 +293,18 @@ button: imul eax, MAX_NICK_LEN mov ebx, [ebx + window.data_ptr] lea esi, [ebx + window_data.names + eax] +; Strip user prefixes + cmp byte[esi], '~' + je .inc + cmp byte[esi], '&' + je .inc + cmp byte[esi], '@' + je .inc + cmp byte[esi], '%' + je .inc + cmp byte[esi], '+' + je .inc + .open: call window_open test ebx, ebx jz mainloop @@ -300,6 +312,9 @@ button: call redraw jmp mainloop + .inc: + inc esi + jmp .open @@: sub ax, WINDOW_BTN_START