Rev 4060 | Rev 4477 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4060 | Rev 4143 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | ;; GNU GENERAL PUBLIC LICENSE ;; |
11 | ;; GNU GENERAL PUBLIC LICENSE ;; |
12 | ;; Version 2, June 1991 ;; |
12 | ;; Version 2, June 1991 ;; |
13 | ;; ;; |
13 | ;; ;; |
14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 15... | Line 15... | ||
15 | 15 | ||
Line 16... | Line 16... | ||
16 | version equ '0.1' |
16 | version equ '0.15' |
17 | 17 | ||
18 | ; connection status |
18 | ; connection status |
19 | STATUS_DISCONNECTED = 0 |
19 | STATUS_DISCONNECTED = 0 |
20 | STATUS_RESOLVING = 1 |
20 | STATUS_RESOLVING = 1 |
Line 21... | Line 21... | ||
21 | STATUS_CONNECTING = 2 |
21 | STATUS_CONNECTING = 2 |
22 | STATUS_CONNECTED = 3 |
22 | STATUS_CONNECTED = 3 |
23 | - | ||
24 | ; window flags |
23 | |
Line 25... | Line 24... | ||
25 | FLAG_UPDATED = 1 shl 0 |
24 | ; window flags |
- | 25 | FLAG_UPDATED = 1 shl 0 |
|
26 | FLAG_CLOSE = 1 shl 1 |
26 | FLAG_RECEIVING_NAMES = 1 shl 1 |
27 | FLAG_RECEIVING_NAMES = 1 shl 2 |
27 | |
28 | 28 | ; window types |
|
29 | ; window types |
29 | WINDOWTYPE_NONE = 0 |
30 | WINDOWTYPE_SERVER = 0 |
30 | WINDOWTYPE_SERVER = 1 |
Line 31... | Line 31... | ||
31 | WINDOWTYPE_CHANNEL = 1 |
31 | WINDOWTYPE_CHANNEL = 2 |
32 | WINDOWTYPE_CHAT = 2 |
32 | WINDOWTYPE_CHAT = 3 |
33 | WINDOWTYPE_LIST = 3 |
33 | WINDOWTYPE_LIST = 4 |
34 | WINDOWTYPE_DCC = 4 |
34 | WINDOWTYPE_DCC = 5 |
Line 35... | Line 35... | ||
35 | 35 | ||
36 | ; supported encodings |
36 | ; supported encodings |
Line 37... | Line 37... | ||
37 | CP866 = 0 |
37 | CP866 = 0 |
38 | CP1251 = 1 |
38 | CP1251 = 1 |
Line 39... | Line 39... | ||
39 | UTF8 = 2 |
39 | UTF8 = 2 |
40 | 40 | ||
Line 41... | Line 41... | ||
41 | ; settings |
41 | ; settings |
- | 42 | USERCMD_MAX_SIZE = 400 |
|
Line 42... | Line 43... | ||
42 | USERCMD_MAX_SIZE = 400 |
43 | |
43 | 44 | WIN_MIN_X = 600 |
|
- | 45 | WIN_MIN_Y = 170 |
|
Line 44... | Line 46... | ||
44 | WIN_MIN_X = 600 |
46 | |
45 | WIN_MIN_Y = 165 |
47 | TEXT_X = 5 |
46 | 48 | TEXT_Y = TOP_Y + 2 |
|
Line 67... | Line 69... | ||
67 | 69 | ||
68 | WINDOW_BTN_START = 100 |
70 | WINDOW_BTN_START = 100 |
69 | WINDOW_BTN_CLOSE = 2 |
71 | WINDOW_BTN_CLOSE = 2 |
Line 70... | Line 72... | ||
70 | WINDOW_BTN_LIST = 3 |
72 | WINDOW_BTN_LIST = 3 |
- | 73 | ||
Line 71... | Line 74... | ||
71 | 74 | SCROLLBAR_WIDTH = 14 |
|
72 | SCROLLBAR_WIDTH = 12 |
- | |
73 | 75 | USERLIST_WIDTH = 100 |
|
Line 74... | Line 76... | ||
74 | USERLIST_X = 98 |
76 | |
Line 75... | Line 77... | ||
75 | 77 | FONT_HEIGHT = 9 |
|
Line 96... | Line 98... | ||
96 | include "../../network.inc" |
98 | include "../../network.inc" |
97 | include "../../struct.inc" |
99 | include "../../struct.inc" |
98 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
100 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
Line 99... | Line 101... | ||
99 | 101 | ||
100 | struct window |
102 | struct window |
101 | data_ptr dd ? ; zero if not used |
103 | data_ptr dd ? |
102 | flags db ? |
104 | flags db ? |
103 | type db ? |
105 | type db ? |
104 | name rb MAX_WINDOWNAME_LEN |
106 | name rb MAX_WINDOWNAME_LEN |
105 | users dd ? |
107 | users dd ? |
106 | users_scroll dd ? |
108 | users_scroll dd ? |
- | 109 | selected dd ? ; selected user, 0 if none selected |
|
- | 110 | ||
- | 111 | text_start dd ? ; pointer to current textbox data |
|
- | 112 | text_end dd ? |
|
- | 113 | text_print dd ? ; pointer to first character to print on screen |
|
- | 114 | text_line_print dd ? ; line number of that character |
|
- | 115 | text_write dd ? ; write pointer |
|
- | 116 | text_lines dd ? ; total number of lines |
|
- | 117 | text_scanned dd ? ; pointer to beginning of unscanned data (we still need to count number of lines, insert newline characters,..) |
|
107 | selected dd ? ; selected user, 0 if none selected |
118 | |
Line 108... | Line 119... | ||
108 | ends |
119 | ends |
109 | 120 | ||
110 | struct window_data |
- | |
111 | text rb 120*60 |
121 | struct window_data |
112 | title rb 256 |
- | |
113 | names rb MAX_NICK_LEN * MAX_USERS |
- | |
114 | usertext rb 256 |
122 | text rb TEXT_BUFFERSIZE |
Line 115... | Line 123... | ||
115 | usertextlen dd ? |
123 | names rb MAX_NICK_LEN * MAX_USERS |
116 | ends |
124 | ends |
117 | 125 | ||
118 | include "encodings.inc" |
126 | include "encodings.inc" |
119 | include "window.inc" ; also contains text print routines |
127 | include "window.inc" |
120 | include "serverparser.inc" |
128 | include "serverparser.inc" |
121 | include "userparser.inc" |
129 | include "userparser.inc" |
Line 158... | Line 166... | ||
158 | mov edi, servercommand |
166 | mov edi, servercommand |
159 | mov ecx, 600/4 |
167 | mov ecx, 600/4 |
160 | rep stosd |
168 | rep stosd |
Line 161... | Line 169... | ||
161 | 169 | ||
162 | ; allocate window data block |
- | |
163 | call window_create |
170 | ; allocate window data block |
164 | mov ebx, windows |
171 | mov ebx, windows |
165 | mov [ebx + window.data_ptr], eax |
172 | call window_create |
- | 173 | test eax, eax |
|
166 | mov [ebx + window.flags], 0 |
174 | jz error |
Line 167... | Line -... | ||
167 | mov [ebx + window.type], WINDOWTYPE_SERVER |
- | |
168 | - | ||
169 | call window_refresh |
175 | mov [ebx + window.type], WINDOWTYPE_SERVER |
170 | 176 | ||
Line 171... | Line 177... | ||
171 | ; get system colors |
177 | ; get system colors |
172 | mcall 48, 3, colors, 40 |
178 | mcall 48, 3, colors, 40 |
173 | 179 | ||
- | 180 | ; set edit box and scrollbar colors |
|
Line 174... | Line 181... | ||
174 | ; set edit box and scrollbar colors |
181 | mov eax, [colors.work] |
175 | mov eax, [colors.work] |
182 | mov [scroll1.bg_color], eax |
- | 183 | mov [scroll2.bg_color], eax |
|
Line 176... | Line 184... | ||
176 | mov [scroll1.bg_color], eax |
184 | |
177 | 185 | mov eax, [colors.work_button] |
|
- | 186 | mov [scroll1.front_color], eax |
|
- | 187 | mov [scroll2.front_color], eax |
|
- | 188 | ||
- | 189 | mov eax, [colors.work_text] |
|
Line 178... | Line 190... | ||
178 | mov eax, [colors.work_button] |
190 | mov [scroll1.line_color], eax |
179 | mov [scroll1.front_color], eax |
191 | mov [scroll2.line_color], eax |
180 | 192 | ||
181 | mov eax, [colors.work_text] |
193 | mov [scroll1.type], 1 ; 0 = simple, 1 = skinned |
Line 182... | Line 194... | ||
182 | mov [scroll1.line_color], eax |
194 | mov [scroll2.type], 1 |
183 | 195 | ||
184 | ; get settings from ini |
196 | ; get settings from ini |
Line 185... | Line 197... | ||
185 | invoke ini.get_str, path, str_user, str_nick, user_nick, MAX_NICK_LEN, default_nick |
197 | invoke ini.get_str, path, str_user, str_nick, user_nick, MAX_NICK_LEN, default_nick |
Line 186... | Line 198... | ||
186 | invoke ini.get_str, path, str_user, str_real, user_real_name, MAX_REAL_LEN, default_real |
198 | invoke ini.get_str, path, str_user, str_real, user_real_name, MAX_REAL_LEN, default_real |
187 | invoke ini.get_str, path, str_user, str_quitmsg, quit_msg, 250, default_quit |
199 | invoke ini.get_str, path, str_user, str_quitmsg, quit_msg, 250, default_quit |
Line 188... | Line 200... | ||
188 | 200 | ||
189 | ; Welcome user |
- | |
190 | mov esi, str_welcome |
201 | ; Welcome user |
191 | call print_text2 |
202 | mov esi, str_welcome |
Line 192... | Line 203... | ||
192 | 203 | call print_text2 |
|
193 | call draw_window ;;; FIXME (gui is not correctly drawn first time because of window sizes) |
204 | |
Line 212... | Line 223... | ||
212 | cmp al, 3 |
223 | cmp al, 3 |
213 | je mouse |
224 | je mouse |
Line 214... | Line 225... | ||
214 | 225 | ||
Line 215... | Line 226... | ||
215 | call process_network_event |
226 | call process_network_event |
216 | 227 | ||
217 | mov edx, [window_active] |
228 | mov edi, [window_active] |
218 | test [edx + window.flags], FLAG_UPDATED |
- | |
219 | jz .no_update |
- | |
220 | and [edx + window.flags], not FLAG_UPDATED |
- | |
221 | mov edx, [edx + window.data_ptr] |
229 | test [edi + window.flags], FLAG_UPDATED |
- | 230 | jz .no_update |
|
- | 231 | call draw_channel_text |
|
- | 232 | mov edi, [window_active] |
|
- | 233 | cmp [edi + window.type], WINDOWTYPE_CHANNEL |
|
222 | add edx, window_data.text |
234 | jne .no_update |
223 | call draw_channel_text |
- | |
Line 224... | Line 235... | ||
224 | .no_update: |
235 | call draw_channel_list |
Line 225... | Line 236... | ||
225 | call print_channel_list |
236 | .no_update: |
Line 234... | Line 245... | ||
234 | cmp ax, 1 ; close program |
245 | cmp ax, 1 ; close program |
235 | je exit |
246 | je exit |
Line 236... | Line 247... | ||
236 | 247 | ||
237 | cmp ax, WINDOW_BTN_CLOSE |
248 | cmp ax, WINDOW_BTN_CLOSE |
238 | jne @f |
- | |
239 | 249 | jne @f |
|
240 | call window_close |
250 | call cmd_usr_close_window |
Line 241... | Line 251... | ||
241 | jmp still |
251 | jmp still |
242 | 252 | ||
243 | @@: |
253 | @@: |
Line 244... | Line 254... | ||
244 | cmp ax, WINDOW_BTN_LIST |
254 | cmp ax, WINDOW_BTN_LIST |
Line 245... | Line 255... | ||
245 | jne @f |
255 | jne @f |
246 | 256 | ||
247 | push eax |
257 | push eax |
248 | 258 | ||
249 | mcall 37, 1 ; Get mouse position |
259 | mcall 37, 1 ; Get mouse position |
250 | sub ax, TEXT_Y |
260 | sub ax, TEXT_Y |
251 | mov bl, 10 |
261 | mov bl, FONT_HEIGHT |
252 | div bl |
262 | div bl |
253 | and eax, 0x000000ff |
263 | and eax, 0x000000ff |
Line 254... | Line 264... | ||
254 | inc eax |
264 | inc eax |
Line 255... | Line 265... | ||
255 | add eax, [scroll1.position] |
265 | add eax, [scroll1.position] |
256 | mov ebx, [window_active] |
266 | mov ebx, [window_active] |
257 | mov [ebx + window.selected], eax |
267 | mov [ebx + window.selected], eax |
Line 281... | Line 291... | ||
281 | jb exit |
291 | jb exit |
Line 282... | Line 292... | ||
282 | 292 | ||
283 | cmp ax, MAX_WINDOWS |
293 | cmp ax, MAX_WINDOWS |
Line -... | Line 294... | ||
- | 294 | ja exit |
|
284 | ja exit |
295 | |
285 | 296 | ; OK, time to switch to another window. |
|
286 | mov dx, sizeof.window |
297 | mov dx, sizeof.window |
287 | mul dx |
298 | mul dx |
288 | shl edx, 16 |
299 | shl edx, 16 |
289 | mov dx, ax |
300 | mov dx, ax |
290 | add edx, windows |
301 | add edx, windows |
291 | cmp [edx + window.data_ptr], 0 |
302 | cmp [edx + window.type], WINDOWTYPE_NONE |
- | 303 | je exit |
|
292 | je exit |
304 | mov [window_active], edx |
293 | mov [window_active], edx |
305 | |
Line 294... | Line 306... | ||
294 | call window_refresh |
306 | mov [scroll2.position], 1 ;;; FIXME |
Line 295... | Line 307... | ||
295 | call draw_window |
307 | call draw_window |
Line 302... | Line 314... | ||
302 | je @f |
314 | je @f |
303 | mov esi, quit_msg |
315 | mov esi, quit_msg |
304 | call cmd_usr_quit_server |
316 | call cmd_usr_quit_server |
305 | @@: |
317 | @@: |
Line -... | Line 318... | ||
- | 318 | ||
- | 319 | error: |
|
306 | 320 | ||
Line 307... | Line 321... | ||
307 | mcall -1 |
321 | mcall -1 |
Line 313... | Line 327... | ||
313 | mcall 2 |
327 | mcall 2 |
Line 314... | Line 328... | ||
314 | 328 | ||
315 | push dword edit1 |
329 | push dword edit1 |
Line -... | Line 330... | ||
- | 330 | call [edit_box_key] |
|
- | 331 | ||
- | 332 | ; cmp ah, 178 |
|
- | 333 | ; jne .no_up |
|
- | 334 | ; |
|
- | 335 | ; jmp still |
|
- | 336 | ; |
|
- | 337 | ; |
|
- | 338 | ; .no_up: |
|
- | 339 | ; cmp ah, 177 |
|
- | 340 | ; jne .no_down |
|
- | 341 | ; |
|
- | 342 | ; jmp still |
|
316 | call [edit_box_key] |
343 | ; |
317 | 344 | ; .no_down: |
|
Line 318... | Line 345... | ||
318 | cmp ah, 13 ; enter |
345 | cmp ah, 13 ; enter |
Line -... | Line 346... | ||
- | 346 | jne no_send2 |
|
- | 347 | ||
319 | jne no_send2 |
348 | call user_parser |
320 | 349 | ||
Line 321... | Line 350... | ||
321 | call user_parser |
350 | mov eax, [edit1.size] |
322 | 351 | ||
Line 323... | Line -... | ||
323 | mov [edit1.size], 0 |
- | |
324 | mov [edit1.pos], 0 |
- | |
325 | - | ||
326 | push dword edit1 |
352 | mov [edit1.size], 0 |
Line 327... | Line 353... | ||
327 | call [edit_box_draw] |
353 | mov [edit1.pos], 0 |
328 | 354 | ||
Line 338... | Line 364... | ||
338 | 364 | ||
339 | mouse: |
365 | mouse: |
340 | push dword edit1 |
366 | push dword edit1 |
Line 341... | Line 367... | ||
341 | call [edit_box_mouse] |
367 | call [edit_box_mouse] |
- | 368 | ||
- | 369 | ; TODO: check if scrollbar is active? |
|
- | 370 | mov edi, [window_active] |
|
342 | 371 | cmp [edi + window.type], WINDOWTYPE_CHANNEL |
|
343 | ; TODO: check if scrollbar is active |
372 | jne @f |
344 | push [scroll1.position] |
373 | push [scroll1.position] |
345 | push dword scroll1 |
374 | push dword scroll1 |
346 | call [scrollbar_v_mouse] |
375 | call [scrollbar_mouse] |
347 | pop eax |
376 | pop eax |
348 | cmp eax, [scroll1.position] ; did the scrollbar move? |
377 | cmp eax, [scroll1.position] ; did the scrollbar move? |
- | 378 | je @f |
|
- | 379 | call draw_channel_list |
|
- | 380 | @@: |
|
- | 381 | ||
- | 382 | ; TODO: check if scrollbar is active? |
|
- | 383 | mov edi, [window_active] |
|
- | 384 | mov eax, [edi + window.text_lines] |
|
- | 385 | cmp eax, [textbox_height] |
|
- | 386 | jbe @f |
|
- | 387 | push dword scroll2 |
|
- | 388 | call [scrollbar_mouse] |
|
- | 389 | ; mov edi, [window_active] |
|
- | 390 | mov edx, [scroll2.position] |
|
- | 391 | sub edx, [edi + window.text_line_print] |
|
349 | je @f |
392 | je @f |
Line 350... | Line 393... | ||
350 | call print_channel_list |
393 | call draw_channel_text.scroll_to_pos |
Line 359... | Line 402... | ||
359 | db 'CP866 ' |
402 | db 'CP866 ' |
360 | db 'CP1251' |
403 | db 'CP1251' |
361 | db 'UTF-8 ' |
404 | db 'UTF-8 ' |
362 | encoding_text_len = 6 |
405 | encoding_text_len = 6 |
Line 363... | Line 406... | ||
363 | 406 | ||
- | 407 | join_header db 3,'3* ', 0 |
|
- | 408 | quit_header db 3,'5* ', 0 |
|
- | 409 | nick_header db 3,'2* ', 0 |
|
- | 410 | kick_header db 3,'5* ', 0 |
|
- | 411 | mode_header db 3,'2* ', 0 |
|
- | 412 | part_header db 3,'5* ', 0 |
|
364 | action_header db '*** ', 0 |
413 | topic_header db 3,'3* ', 0 |
365 | action_header_short db '* ', 0 |
414 | action_header db 3,'6* ', 0 |
- | 415 | ctcp_header db 3,'13-> [',0 |
|
366 | ctcp_header db '-> [',0 |
416 | msg_header db 3,'7-> *',0 |
367 | ctcp_version db '] VERSION',10,0 |
417 | ctcp_version db '] VERSION',10,0 |
368 | ctcp_ping db '] PING',10,0 |
418 | ctcp_ping db '] PING',10,0 |
369 | ctcp_time db '] TIME',10,0 |
419 | ctcp_time db '] TIME',10,0 |
370 | has_left_channel db ' has left ', 0 |
420 | has_left_channel db ' has left ', 0 |
Line 374... | Line 424... | ||
374 | sets_mode db ' sets mode ', 0 |
424 | sets_mode db ' sets mode ', 0 |
375 | kicked db ' is kicked from ', 0 |
425 | kicked db ' is kicked from ', 0 |
376 | str_talking db 'Now talking in ',0 |
426 | str_talking db 'Now talking in ',0 |
377 | str_topic db 'Topic is ',0 |
427 | str_topic db 'Topic is ',0 |
378 | str_setby db 'Set by ',0 |
428 | str_setby db 'Set by ',0 |
- | 429 | str_reconnect db 'Connection reset by user.',10,0 |
|
Line 379... | Line 430... | ||
379 | 430 | ||
380 | str_version db 'VERSION ' |
431 | str_version db 'VERSION ' |
Line 381... | Line 432... | ||
381 | str_programname db 'KolibriOS IRC client ', version, 0 |
432 | str_programname db 'KolibriOS IRC client ', version, 0 |
Line 388... | Line 439... | ||
388 | 439 | ||
389 | default_nick db 'kolibri_user', 0 |
440 | default_nick db 'kolibri_user', 0 |
390 | default_real db 'Kolibri User', 0 |
441 | default_real db 'Kolibri User', 0 |
Line 391... | Line -... | ||
391 | default_quit db 'KolibriOS forever', 0 |
- | |
392 | 442 | default_quit db 'KolibriOS forever', 0 |
|
393 | str_welcome db 10 |
443 | |
394 | db ' ______________________ __ __ __',10 |
444 | str_welcome db 3,'3 ___',3,'7__________',3,'6_________ ',3,'4 __ __ __',10 |
395 | db '| \______ \_ ___ \ ____ | | |__| ____ _____/ |_',10 |
445 | db 3,'3| \',3,'7______ \',3,'6_ ___ \ ',3,'4 ____ | | |__| ____ _____/ |_',10 |
396 | db '| || _/ \ \/ _/ ___\| | | |/ __ \ / \ __\',10 |
446 | db 3,'3| |',3,'7| _/',3,'6 \ \/ ',3,'4 _/ ___\| | | |/ __ \ / \ __\',10 |
397 | db '| || | \ \____ \ \___| |_| \ ___/| | \ |',10 |
447 | db 3,'3| |',3,'7| | \',3,'6 \____',3,'4 \ \___| |_| \ ___/| | \ |',10 |
398 | db '|___||____|_ /\______ / \___ >____/__|\___ >___| /__|',10 |
448 | db 3,'3|___|',3,'7|____|_ /\',3,'6______ /',3,'4 \___ >____/__|\___ >___| /__|',10 |
399 | db ' \/ \/ \/ \/ \/',10 |
449 | db 3,'3 ',3,'7 \/ ',3,'6 \/ ',3,'4 \/ \/ \/',10 |
400 | db 10 |
450 | db 10 |
401 | db 'Welcome to IRC client ',version,' for KolibriOS',10 |
451 | db 'Welcome to the KolibriOS IRC client v',version,10 |
Line 402... | Line 452... | ||
402 | db 10 |
452 | db 10 |
403 | db 'Type /help for help',10,0 |
453 | db 'Type /help for help',10,10,0 |
404 | 454 | ||
405 | str_nickchange db 'Nickname is now ',0 |
455 | str_nickchange db 'Nickname is now ',0 |
406 | str_realchange db 'Real name is now ',0 |
456 | str_realchange db 'Real name is now ',0 |
407 | str_dotnewline db '.',10, 0 |
457 | str_dotnewline db '.',10, 0 |
408 | str_newline db 10, 0 |
458 | str_newline db 10, 0 |
409 | str_connecting db 10,'* Connecting to ',0 |
459 | str_connecting db 3,'3* Connecting to ',0 |
410 | str_help db 10,'following commands are available:',10 |
460 | str_help db 10,'following commands are available:',10 |
411 | db 10 |
461 | db 10 |
412 | db '/nick |
462 | db '/nick |
Line 413... | Line 463... | ||
413 | db '/real |
463 | db '/real |
414 | db '/server : connect to server ',10 |
464 | db '/server : connect to server ',10 |
Line 415... | Line 465... | ||
415 | db '/code |
465 | db '/code |
416 | 466 | ||
417 | str_1 db ' -',0 |
467 | str_1 db 3,'13 -',0 |
Line -... | Line 468... | ||
- | 468 | str_2 db '- ',0 |
|
- | 469 | ||
- | 470 | str_sockerr db 'Socket Error',10,0 |
|
- | 471 | str_dnserr db 'Unable to resolve hostname.',10,0 |
|
- | 472 | str_refused db 'Connection refused',10,0 |
|
- | 473 | ||
- | 474 | irc_colors dd 0xffffff ; 0 white |
|
- | 475 | dd 0x000000 ; 1 black |
|
- | 476 | dd 0x00007f ; 2 blue (navy) |
|
- | 477 | dd 0x009300 ; 3 green |
|
- | 478 | dd 0xff0000 ; 4 red |
|
- | 479 | dd 0x7f0000 ; 5 brown (maroon) |
|
- | 480 | dd 0x9c009c ; 6 purple |
|
- | 481 | dd 0xfc7f00 ; 7 olive |
|
- | 482 | dd 0xffff00 ; 8 yellow |
|
- | 483 | dd 0x00fc00 ; 9 light green |
|
- | 484 | dd 0x009393 ; 10 teal |
|
418 | str_2 db '- ',0 |
485 | dd 0x00ffff ; 11 cyan |
419 | 486 | dd 0x0000fc ; 12 royal blue |
|
420 | str_sockerr db 'Socket Error',10,0 |
487 | dd 0xff00ff ; 13 pink |
421 | str_dnserr db 'Unable to resolve hostname.',10,0 |
488 | dd 0x7f7f7f ; 14 grey |
422 | str_refused db 'Connection refused',10,0 |
489 | dd 0xd4d0c4 ; 15 light grey (silver) |
Line 423... | Line 490... | ||
423 | 490 | ||
Line -... | Line 491... | ||
- | 491 | sockaddr1: |
|
424 | sockaddr1: |
492 | dw AF_INET4 |
425 | dw AF_INET4 |
493 | .port dw 0x0b1a ; 6667 |
426 | .port dw 0x0b1a ; 6667 |
- | |
Line 427... | Line 494... | ||
427 | .ip dd 0 |
494 | .ip dd 0 |
428 | rb 10 |
495 | rb 10 |
Line 429... | Line 496... | ||
429 | 496 | ||
Line 455... | Line 522... | ||
455 | 522 | ||
456 | import boxlib,\ |
523 | import boxlib,\ |
457 | edit_box_draw ,'edit_box' ,\ |
524 | edit_box_draw, 'edit_box',\ |
458 | edit_box_key ,'edit_box_key' ,\ |
525 | edit_box_key, 'edit_box_key',\ |
459 | edit_box_mouse ,'edit_box_mouse' ,\ |
526 | edit_box_mouse, 'edit_box_mouse',\ |
460 | scrollbar_v_draw ,'scrollbar_v_draw' ,\ |
527 | scrollbar_draw, 'scrollbar_v_draw',\ |
Line 461... | Line 528... | ||
461 | scrollbar_v_mouse,'scrollbar_v_mouse' |
528 | scrollbar_mouse,'scrollbar_v_mouse' |
Line 462... | Line 529... | ||
462 | 529 | ||
463 | I_END: |
530 | I_END: |
464 | 531 | ||
465 | ; width, left, top |
532 | ; width, left, top |
466 | edit1 edit_box 0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_focus, 25, 25 |
533 | edit1 edit_box 0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_focus, 25, 25 |
Line 467... | Line 534... | ||
467 | ; xsize, xpos, ysize, ypos, max, cur, pos, bgcol, frcol, linecol |
534 | ; xsize, xpos, ysize, ypos, btn_height, max, cur, pos, bgcol, frcol, linecol |
468 | scroll1 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1 |
535 | scroll1 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1 |
Line 469... | Line -... | ||
469 | scroll2 scrollbar SCROLLBAR_WIDTH, 300, 150, TOP_Y, 10, 100, 0, 0, 0, 0, 0, 1 |
- | |
470 | 536 | scroll2 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1 |
|
471 | usercommand db '/server chat.freenode.net', 0 |
537 | |
472 | rb MAX_COMMAND_LEN |
538 | usercommand db '/server chat.freenode.net', 0 |
473 | 539 | rb MAX_COMMAND_LEN |
|
474 | main_PID dd ? ; identifier of main thread |
540 |