Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4658 → Rev 4659

/programs/network/ircc/gui.inc
121,8 → 121,13
cmp [edi + window.type], WINDOWTYPE_CHANNEL
jne .not_channel
 
; draw a vertical separator line
; TODO: dont draw this if we draw textbox scrollbar ??
mov [scroll1.all_redraw], 1
call draw_channel_list
 
; draw a vertical separator line when there is no scrollbar
cmp [scroll2.all_redraw], 1
jne .not_channel
 
mov ebx, [xsize]
sub ebx, USERLIST_WIDTH + SCROLLBAR_WIDTH + 3
push bx
129,12 → 134,9
shl ebx, 16
pop bx
mov ecx, [ysize]
add ecx, TOP_Y SHL 16 -(BOTTOM_Y) ;;;;
add ecx, TOP_Y shl 16 - (BOTTOM_Y)
mov edx, [colors.work_graph]
mcall 38
 
mov [scroll1.all_redraw], 1
call draw_channel_list
.not_channel:
 
; draw editbox
/programs/network/ircc/ircc.asm
13,7 → 13,7
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
version equ '0.20'
version equ '0.21'
 
; connection status
STATUS_DISCONNECTED = 0
563,7 → 563,7
scrollbar_mouse,'scrollbar_v_mouse'
 
; width, left, top
edit1 edit_box 0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_focus, 25, 25
edit1 edit_box 0, 0, 0, 0xffffff, 0x6f9480, 0, 0, 0, USERCMD_MAX_SIZE, usercommand, mouse_dd, ed_always_focus, 25, 25
; xsize, xpos, ysize, ypos, btn_height, max, cur, pos, bgcol, frcol, linecol
scroll1 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
scroll2 scrollbar SCROLLBAR_WIDTH, 0, 0, TOP_Y, SCROLLBAR_WIDTH, 0, 0, 0, 0, 0, 0, 1
/programs/network/ircc/serverparser.inc
257,10 → 257,6
jz .fail2
pop esi
call skip_parameter ; our own nickname
 
cmp byte[esi], 1 ; Client to Client protocol?
je cmd_ctcp
 
jmp .print
 
.channel:
269,7 → 265,9
jz .fail
 
.print:
; nope, just plain old privmsg, print it using '<nick> message' format
cmp byte[esi], 1 ; Client to Client protocol?
je cmd_ctcp
 
if TIMESTAMP
call print_timestamp
end if
/programs/network/ircc/userparser.inc
117,7 → 117,6
.number = ($ - user_commands) / 8
 
 
 
server_command:
 
mov eax, dword[usercommand+1] ; skip '/'
126,7 → 125,7
mov edi, user_commands
mov ecx, user_commands.number
cmp [status], STATUS_CONNECTED
jne .loop
je .loop
mov ecx, user_commands.number2
.loop:
scasd
137,6 → 136,10
 
cmp [status], STATUS_CONNECTED
jne .notconnected
; Commands shorter then 3 chars are placed here
and eax, 0x00ffffff
cmp eax, 'me '
je cmd_usr_me
 
jmp cmd_usr_send ; If none of the previous commands, just send to server
 
432,7 → 435,6
cmd_usr_close_window:
 
mov esi, [window_active]
mov [window_print], esi
cmp [esi + window.type], WINDOWTYPE_SERVER
je .not_channel
 
540,6 → 542,74
 
 
 
cmd_usr_me:
 
; prepare a 'PRIVMSG '
mov dword[packetbuf], 'PRIV'
mov dword[packetbuf+4], 'MSG '
lea edi, [packetbuf+8]
 
; append the destination (nickname/channel)
mov esi, [window_active]
lea esi, [esi + window.name]
@@:
lodsb
test al, al
je @f
stosb
jmp @r
@@:
 
; Make the CTCP action header
mov eax, ' :' + 0x01 shl 16 + 'A' shl 24
stosd
mov eax, 'CTIO'
stosd
mov al, 'N'
stosb
 
; copy the message itself (including first space)
mov esi, usercommand+3
@@:
lodsb
cmp al, 13
je @f
stosb
jmp @r
@@:
 
; end of CTCP message
mov al, 0x01
stosb
mov ax, 0x0a0d
stosw
 
; now send it to the server
lea esi, [edi - packetbuf] ; calculate length
mcall send, [socketnum], packetbuf, , 0 ; and finally send to server
 
; print to local window
if TIMESTAMP
call print_timestamp
end if
 
mov esi, action_header
call print_asciiz
 
mov esi, user_nick
call print_asciiz
 
mov esi, usercommand+3
mov bl, 13
call print_string
 
mov al, 10
call print_char
 
ret
 
 
 
; The user typed some undefined command, just recode it and send to the server
cmd_usr_send:
 
/programs/network/ircc/users.inc
15,6 → 15,7
 
user_prefixes db '~&@%+ ', 0 ; in descending order
 
; TODO: update selected user if needed
; esi is ptr to nick
; ebx is ptr to window
align 4
120,7 → 121,7
 
 
 
 
; TODO: update selected user if needed
; esi is ptr to nick
; ebx is ptr to window
align 4