Rev 3981 | Rev 4659 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3981 | Rev 4143 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
- | 6 | ;; Written by hidnplayr@kolibrios.org ;; |
|
6 | ;; ;; |
7 | ;; ;; |
7 | ;; GNU GENERAL PUBLIC LICENSE ;; |
8 | ;; GNU GENERAL PUBLIC LICENSE ;; |
8 | ;; Version 2, June 1991 ;; |
9 | ;; Version 2, June 1991 ;; |
9 | ;; ;; |
10 | ;; ;; |
10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line -... | Line 12... | ||
- | 12 | ||
- | 13 | ; TODO: work correctly with user prefixes. |
|
- | 14 | ; use first byte of nick for prefix ONLY (use a space for those that do not have special powers..) |
|
- | 15 | ||
Line 11... | Line 16... | ||
11 | 16 | user_prefixes db '~&@%+ ', 0 ; in descending order |
|
12 | 17 | ||
13 | ; esi is ptr to nick |
18 | ; esi is ptr to nick |
14 | ; ebx is ptr to window |
19 | ; ebx is ptr to window |
Line 76... | Line 81... | ||
76 | ; OK, insert it here.. |
81 | ; OK, insert it here.. |
Line 77... | Line 82... | ||
77 | 82 | ||
78 | ; mov all trailing usernames by MAX_NICK_LEN bytes |
83 | ; mov all trailing usernames by MAX_NICK_LEN bytes |
79 | push esi edi |
84 | push esi edi |
80 | mov esi, [ebx + window.data_ptr] |
85 | mov esi, [ebx + window.data_ptr] |
81 | add esi, window_data.names + MAX_NICK_LEN * (MAX_USERS - 1) |
- | |
82 | 86 | add esi, window_data.names + MAX_NICK_LEN * (MAX_USERS - 1) - 4 ; -4 because we're copying backward, dword wise |
|
83 | mov ecx, esi |
87 | mov ecx, esi |
84 | sub ecx, edi |
88 | sub ecx, edi |
85 | add ecx, MAX_NICK_LEN |
89 | add ecx, MAX_NICK_LEN |
86 | shr ecx, 2 |
90 | shr ecx, 2 |
Line 96... | Line 100... | ||
96 | lodsb |
100 | lodsb |
97 | cmp al, ' ' |
101 | cmp al, ' ' |
98 | je .done |
102 | je .done |
99 | cmp al, '!' |
103 | cmp al, '!' |
100 | je .done |
104 | je .done |
- | 105 | cmp al, 13 |
|
- | 106 | je .done |
|
- | 107 | cmp al, 10 |
|
- | 108 | je .done |
|
101 | stosb |
109 | stosb |
102 | loop .fill |
110 | loop .fill |
103 | .done: |
111 | .done: |
104 | xor al, al |
112 | xor al, al |
105 | stosb |
113 | stosb |
Line 106... | Line 114... | ||
106 | 114 | ||
- | 115 | inc [ebx + window.users] |
|
Line 107... | Line 116... | ||
107 | inc [ebx + window.users] |
116 | or [ebx + window.flags], FLAG_UPDATED |
Line 126... | Line 135... | ||
126 | sub ecx, esi |
135 | sub ecx, esi |
127 | shr ecx, 2 |
136 | shr ecx, 2 |
128 | rep movsd |
137 | rep movsd |
Line 129... | Line 138... | ||
129 | 138 | ||
130 | dec [ebx + window.users] |
139 | dec [ebx + window.users] |
Line 131... | Line 140... | ||
131 | xor eax, eax |
140 | or [ebx + window.flags], FLAG_UPDATED |