Subversion Repositories Kolibri OS

Rev

Rev 4622 | Rev 4659 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4622 Rev 4623
Line 169... Line 169...
169
 
169
 
Line 170... Line 170...
170
 
170
 
171
cmd_justprint:
171
cmd_justprint:
-
 
172
 
172
 
173
        add     esi, 4
-
 
174
        call    skip_parameter          ; our nickname
173
        add     esi, 4
175
 
174
        call    skip_parameter
176
        call    print_asciiz
Line 175... Line 177...
175
        call    print_text2
177
 
Line 176... Line 178...
176
        mov     esi, str_newline
178
        mov     al, 10
Line 189... Line 191...
189
        jne     .gogogo
191
        jne     .gogogo
Line 190... Line 192...
190
 
192
 
191
        mov     byte [esi-1], 0
193
        mov     byte [esi-1], 0
192
        push    esi
194
        push    esi
193
        mov     esi, str_1
195
        mov     esi, str_1
194
        call    print_text2
196
        call    print_asciiz
195
        mov     eax, servercommand+1
197
        mov     esi, servercommand+1
196
        mov     dl, '!'
198
        mov     bl, '!'
197
        call    print_text
199
        call    print_string
198
        mov     esi, str_2
200
        mov     esi, str_2
199
        call    print_text2
201
        call    print_asciiz
Line 200... Line 202...
200
        pop     esi
202
        pop     esi
201
 
203
 
202
  .gogogo:
204
  .gogogo:
203
        add     esi, 6
205
        add     esi, 6
204
        call    skip_parameter
206
        call    skip_parameter
Line 205... Line 207...
205
        call    skip_parameter
207
        call    skip_parameter
206
        call    print_text2
208
        call    print_asciiz
Line 207... Line 209...
207
 
209
 
Line 249... Line 251...
249
 
251
 
250
; private chat message
252
; private chat message
251
        push    esi
253
        push    esi
252
        mov     esi, servercommand+1
254
        mov     esi, servercommand+1
-
 
255
        call    window_open
-
 
256
        test    ebx, ebx
253
        call    window_open
257
        jz      .fail2
254
        pop     esi
258
        pop     esi
Line 255... Line 259...
255
        call    skip_parameter  ; our own nickname
259
        call    skip_parameter  ; our own nickname
256
 
260
 
Line 257... Line 261...
257
        cmp     byte[esi], 1    ; Client to Client protocol?
261
        cmp     byte[esi], 1    ; Client to Client protocol?
Line 258... Line 262...
258
        je      cmd_ctcp
262
        je      cmd_ctcp
259
 
263
 
-
 
264
        jmp     .print
-
 
265
 
Line 260... Line 266...
260
        jmp     .print
266
  .channel:
261
 
267
        call    window_open
262
  .channel:
268
        test    ebx, ebx
263
        call    window_open
269
        jz      .fail
264
 
270
 
Line 265... Line 271...
265
  .print:
271
  .print:
266
; nope, just plain old privmsg, print it using ' message' format
272
; nope, just plain old privmsg, print it using ' message' format
267
        if TIMESTAMP
273
        if TIMESTAMP
Line 268... Line 274...
268
        call    print_timestamp
274
        call    print_timestamp
269
        end if
275
        end if
270
 
276
 
Line 271... Line 277...
271
        push    esi
277
        push    esi
272
        mov     bl, '<'
278
        mov     al, '<'
Line 273... Line 279...
273
        call    print_character
279
        call    print_char
274
 
280
 
Line 275... Line 281...
275
        mov     eax, servercommand+1
281
        mov     esi, servercommand+1
-
 
282
        mov     bl, '!'
-
 
283
        call    print_string
-
 
284
 
276
        mov     dl, '!'
285
        mov     al, '>'
Line 277... Line 286...
277
        call    print_text
286
        call    print_char
278
 
-
 
Line -... Line 287...
-
 
287
 
-
 
288
        mov     al, ' '
279
        mov     bl, '>'
289
        call    print_char
280
        call    print_character
290
 
Line 353... Line 363...
353
        if TIMESTAMP
363
        if TIMESTAMP
354
        call    print_timestamp
364
        call    print_timestamp
355
        end if
365
        end if
Line 356... Line 366...
356
 
366
 
357
        mov     esi, ctcp_header
367
        mov     esi, ctcp_header
Line 358... Line 368...
358
        call    print_text2
368
        call    print_asciiz
359
 
369
 
Line 360... Line 370...
360
        mov     esi, servercommand+1
370
        mov     esi, servercommand+1
361
        call    print_text2
371
        call    print_asciiz
Line 362... Line 372...
362
 
372
 
Line 363... Line 373...
363
        mov     esi, ctcp_time
373
        mov     esi, ctcp_time
364
        call    print_text2
374
        call    print_asciiz
Line 372... Line 382...
372
        if TIMESTAMP
382
        if TIMESTAMP
373
        call    print_timestamp
383
        call    print_timestamp
374
        end if
384
        end if
Line 375... Line 385...
375
 
385
 
376
        mov     esi, ctcp_header
386
        mov     esi, ctcp_header
Line 377... Line 387...
377
        call    print_text2
387
        call    print_asciiz
378
 
388
 
Line 379... Line 389...
379
        mov     esi, servercommand+1
389
        mov     esi, servercommand+1
380
        call    print_text2
390
        call    print_asciiz
Line 381... Line 391...
381
 
391
 
Line 382... Line 392...
382
        mov     esi, ctcp_version
392
        mov     esi, ctcp_version
383
        call    print_text2
393
        call    print_asciiz
Line 390... Line 400...
390
        if TIMESTAMP
400
        if TIMESTAMP
391
        call    print_timestamp
401
        call    print_timestamp
392
        end if
402
        end if
Line 393... Line 403...
393
 
403
 
394
        mov     esi, ctcp_header
404
        mov     esi, ctcp_header
Line 395... Line 405...
395
        call    print_text2
405
        call    print_asciiz
396
 
406
 
Line 397... Line 407...
397
        mov     esi, servercommand+1
407
        mov     esi, servercommand+1
398
        call    print_text2
408
        call    print_asciiz
Line 399... Line 409...
399
 
409
 
Line 400... Line 410...
400
        mov     esi, ctcp_ping
410
        mov     esi, ctcp_ping
401
        call    print_text2
411
        call    print_asciiz
Line 409... Line 419...
409
        if TIMESTAMP
419
        if TIMESTAMP
410
        call    print_timestamp
420
        call    print_timestamp
411
        end if
421
        end if
Line 412... Line 422...
412
 
422
 
413
        mov     esi, action_header
423
        mov     esi, action_header
Line 414... Line 424...
414
        call    print_text2
424
        call    print_asciiz
415
 
425
 
416
        mov     eax, servercommand+1    ; print nickname
426
        mov     esi, servercommand+1    ; print nickname
Line 417... Line 427...
417
        mov     dl, '!'
427
        mov     bl, '!'
418
        call    print_text
428
        call    print_string
Line 419... Line 429...
419
 
429
 
420
        mov     bl, ' '
430
        mov     al, ' '
Line 421... Line 431...
421
        call    print_character
431
        call    print_char
422
 
432
 
Line 423... Line 433...
423
        pop     esi
433
        pop     esi
Line 424... Line 434...
424
        call    print_text2             ; print message
434
        call    print_asciiz
Line 438... Line 448...
438
        je      .send
448
        je      .send
Line 439... Line 449...
439
 
449
 
Line 440... Line 450...
440
        ret
450
        ret
441
 
-
 
442
  .send:
451
 
-
 
452
  .send:
-
 
453
        call    window_open
443
 
454
        test    ebx, ebx
Line -... Line 455...
-
 
455
        jz      .fail
-
 
456
        mov     [ebx + window.type], WINDOWTYPE_DCC
444
        call    window_open
457
 
Line 445... Line 458...
445
        mov     [ebx + window.type], WINDOWTYPE_DCC
458
  .fail:
Line 518... Line 531...
518
 
531
 
519
; somebody else parted, just print message
532
; somebody else parted, just print message
520
  .not_me:
533
  .not_me:
521
        push    esi
534
        push    esi
-
 
535
        call    window_open
-
 
536
        test    ebx, ebx
Line 522... Line 537...
522
        call    window_open
537
        jz      .fail2
523
 
538
 
524
        if TIMESTAMP
539
        if TIMESTAMP
Line 525... Line 540...
525
        call    print_timestamp
540
        call    print_timestamp
526
        end if
541
        end if
Line 527... Line 542...
527
 
542
 
528
        mov     esi, part_header
543
        mov     esi, part_header
529
        call    print_text2
-
 
530
 
544
        call    print_asciiz
Line 531... Line 545...
531
        mov     eax, servercommand+1
545
 
532
        mov     dl, '!'
546
        mov     esi, servercommand+1
Line 533... Line 547...
533
        mov     cl, ' '
547
        mov     bl, '!'
534
        call    print_text
548
        call    print_string
Line 535... Line 549...
535
 
549
 
536
        mov     esi, has_left_channel
550
        mov     esi, has_left_channel
Line 537... Line 551...
537
        call    print_text2
551
        call    print_asciiz
538
 
552
 
539
        pop     esi
553
        pop     esi
Line 540... Line 554...
540
        call    print_text2
554
        call    print_asciiz
Line -... Line 555...
-
 
555
 
-
 
556
        mov     al, 10
-
 
557
        call    print_char
-
 
558
 
-
 
559
        mov     ebx, [window_print]
Line 541... Line 560...
541
 
560
        mov     esi, servercommand+1
Line 542... Line 561...
542
        mov     esi, str_newline
561
        call    user_remove
543
        call    print_text2
562
 
544
 
563
        ret
Line 545... Line 564...
545
        mov     ebx, [window_print]
564
 
546
        mov     esi, servercommand+1
565
  .fail2:
547
        call    user_remove
566
        pop     esi
548
 
567
 
Line 549... Line 568...
549
        ret
568
        ret
550
 
569
 
551
 
570
 
552
 
571
 
553
cmd_join:
572
cmd_join:
554
 
573
 
Line 555... Line 574...
555
        cmp     byte[esi+4], ' '
574
        cmp     byte[esi+4], ' '
556
        jne     .fail
575
        jne     .fail
557
        add     esi, 5  ; skip 'JOIN '
576
        add     esi, 5  ; skip 'JOIN '
Line 558... Line 577...
558
 
577
 
559
; compare nick: did we join a channel?
578
; did we join a channel?
Line 560... Line 579...
560
        mov     edi, servercommand+1
579
        mov     edi, servercommand+1
561
        call    compare_to_nick
580
        call    compare_to_nick
Line 562... Line 581...
562
        jne     .not_me
581
        jne     .not_me
563
 
582
 
564
        push    esi
583
        push    esi
Line 565... Line 584...
565
        call    window_open
584
        call    window_open
566
        test    eax, eax
585
        test    ebx, ebx
Line 567... Line 586...
567
        jz      .fail
586
        jz      .fail
Line 568... Line 587...
568
        mov     [ebx + window.type], WINDOWTYPE_CHANNEL
587
        mov     [ebx + window.type], WINDOWTYPE_CHANNEL
Line 569... Line 588...
569
        mov     [window_active], ebx
588
        mov     [window_active], ebx
570
 
589
 
571
        if TIMESTAMP
590
        if TIMESTAMP
-
 
591
        call    print_timestamp
-
 
592
        end if
Line 572... Line 593...
572
        call    print_timestamp
593
 
573
        end if
594
        mov     esi, join_header
574
 
595
        call    print_asciiz
Line 575... Line 596...
575
        mov     esi, join_header
596
 
576
        call    print_text2
597
        mov     esi, str_talking
Line 577... Line 598...
577
 
598
        call    print_asciiz
578
        mov     esi, str_talking
599
 
579
        call    print_text2
600
        pop     esi
Line 580... Line 601...
580
 
601
        mov     bl, ' '
581
        pop     eax
602
        call    print_string
Line 582... Line 603...
582
        mov     dl, ' '
603
 
583
        call    print_text
604
        mov     al, 10
Line 584... Line 605...
584
 
605
        call    print_char
585
        mov     esi, str_dotnewline
606
 
Line 586... Line 607...
586
        call    print_text2
607
        call    draw_window
587
 
608
 
588
        call    draw_window
609
        ret
Line 589... Line 610...
589
 
610
 
Line 590... Line 611...
590
        ret
611
  .not_me:
591
 
612
        push    esi
592
  .not_me:
613
        call    window_open
Line 688... Line 709...
688
        if TIMESTAMP
709
        if TIMESTAMP
689
        call    print_timestamp
710
        call    print_timestamp
690
        end if
711
        end if
Line 691... Line 712...
691
 
712
 
692
        mov     esi, nick_header
713
        mov     esi, nick_header
Line 693... Line 714...
693
        call    print_text2
714
        call    print_asciiz
694
 
715
 
695
        mov     eax, servercommand+1
716
        mov     esi, servercommand+1
Line 696... Line 717...
696
        mov     dl, '!'
717
        mov     bl, '!'
697
        call    print_text
718
        call    print_string
Line 698... Line 719...
698
 
719
 
699
        mov     esi, is_now_known_as
720
        mov     esi, is_now_known_as
Line 700... Line 721...
700
        call    print_text2
721
        call    print_asciiz
701
 
722
 
Line 702... Line 723...
702
        mov     esi, [esp + 8]  ; FIXME: dont print the 0x0a0d!!!
723
        mov     esi, [esp + 8]
703
        call    print_text2
724
        call    print_asciiz
704
 
725
 
705
        mov     esi, str_newline
726
        mov     al, 10
Line 732... Line 753...
732
 
753
 
733
  .not_me:
754
  .not_me:
734
; find the channel user has been kicked from
755
; find the channel user has been kicked from
735
        push    esi
756
        push    esi
-
 
757
        call    window_open
-
 
758
        test    ebx, ebx
736
        call    window_open
759
        jz      .fail
Line 737... Line 760...
737
        push    esi
760
        push    esi
738
 
761
 
739
        if TIMESTAMP
762
        if TIMESTAMP
Line 740... Line 763...
740
        call    print_timestamp
763
        call    print_timestamp
741
        end if
764
        end if
Line 742... Line 765...
742
 
765
 
743
        mov     esi, kick_header
766
        mov     esi, kick_header
744
        call    print_text2
767
        call    print_asciiz
Line 745... Line 768...
745
 
768
 
746
        pop     eax
769
        pop     esi
Line 747... Line 770...
747
        mov     dl, ' '
770
        mov     bl, ' '
748
        call    print_text
771
        call    print_string
749
 
772
 
Line 750... Line 773...
750
        mov     esi, str_kicked
773
        mov     esi, str_kicked
751
        call    print_text2
774
        call    print_asciiz
Line 752... Line 775...
752
 
775
 
753
        pop     eax
776
        pop     esi
754
        mov     dl, ' '
777
        mov     bl, ' '
Line 755... Line 778...
755
        call    print_text
778
        call    print_string
756
 
779
 
Line 757... Line 780...
757
        mov     esi, str_by
780
        mov     esi, str_by
758
        call    print_text2
781
        call    print_asciiz
759
 
782
 
Line -... Line 783...
-
 
783
        mov     esi, servercommand+1
-
 
784
        mov     bl, '!'
760
        mov     eax, servercommand+1
785
        call    print_string
-
 
786
 
Line 761... Line 787...
761
        mov     dl, '!'
787
        mov     al, 10
Line 798... Line 824...
798
        if TIMESTAMP
824
        if TIMESTAMP
799
        call    print_timestamp
825
        call    print_timestamp
800
        end if
826
        end if
Line 801... Line 827...
801
 
827
 
802
        mov     esi, quit_header
828
        mov     esi, quit_header
Line 803... Line 829...
803
        call    print_text2
829
        call    print_asciiz
804
 
830
 
805
        mov     eax, servercommand+1
831
        mov     esi, servercommand+1
Line 806... Line 832...
806
        mov     dl, '!'
832
        mov     bl, '!'
807
        call    print_text
833
        call    print_string
Line 808... Line 834...
808
 
834
 
809
        mov     esi, has_quit_irc
835
        mov     esi, has_quit_irc
810
        call    print_text2
836
        call    print_asciiz
811
 
837
 
Line 839... Line 865...
839
        if TIMESTAMP
865
        if TIMESTAMP
840
        call    print_timestamp
866
        call    print_timestamp
841
        end if
867
        end if
Line 842... Line 868...
842
 
868
 
843
        mov     esi, mode_header
869
        mov     esi, mode_header
Line 844... Line 870...
844
        call    print_text2
870
        call    print_asciiz
845
 
871
 
846
        mov     eax, servercommand+1
872
        mov     esi, servercommand+1
Line 847... Line 873...
847
        mov     dl, '!'
873
        mov     bl, '!'
848
        call    print_text
874
        call    print_string
Line 849... Line 875...
849
 
875
 
850
        mov     esi, sets_mode
876
        mov     esi, sets_mode
Line 851... Line 877...
851
        call    print_text2
877
        call    print_asciiz
852
 
878
 
Line 853... Line 879...
853
        pop     esi
879
        pop     esi
Line 854... Line 880...
854
        call    print_text2
880
        call    print_asciiz
855
 
881
 
Line 866... Line 892...
866
        if TIMESTAMP
892
        if TIMESTAMP
867
        call    print_timestamp
893
        call    print_timestamp
868
        end if
894
        end if
Line 869... Line 895...
869
 
895
 
870
        mov     esi, mode_header
896
        mov     esi, mode_header
Line 871... Line 897...
871
        call    print_text2
897
        call    print_asciiz
872
 
898
 
873
        mov     eax, [esp]
899
        mov     esi, [esp]
Line 874... Line 900...
874
        mov     dl, ' '
900
        mov     bl, ' '
875
        call    print_text
901
        call    print_string
Line 876... Line 902...
876
 
902
 
877
        mov     esi, sets_mode
903
        mov     esi, sets_mode
878
        call    print_text2
904
        call    print_asciiz
Line 879... Line 905...
879
 
905
 
880
        pop     esi
906
        pop     esi
Line 881... Line 907...
881
        call    skip_parameter
907
        call    skip_parameter
Line 882... Line 908...
882
        call    print_text2
908
        call    print_asciiz
Line 892... Line 918...
892
        add     esi, 4  ; skip '353 '
918
        add     esi, 4  ; skip '353 '
893
        call    skip_parameter
919
        call    skip_parameter
894
        inc     esi     ; channel type '*', '=' or '@'
920
        inc     esi     ; channel type '*', '=' or '@'
895
        inc     esi     ; ' '
921
        inc     esi     ; ' '
896
        call    window_open
922
        call    window_open
-
 
923
        test    ebx, ebx
-
 
924
        jz      .fail
Line 897... Line 925...
897
 
925
 
898
; now find window ptr and check if this is the first 353 message
926
; now find window ptr and check if this is the first 353 message
899
        mov     ebx, [window_print]
927
        mov     ebx, [window_print]
900
        test    [ebx + window.flags], FLAG_RECEIVING_NAMES
928
        test    [ebx + window.flags], FLAG_RECEIVING_NAMES
Line 917... Line 945...
917
        jne     .namesloop
945
        jne     .namesloop
918
        jmp     .add
946
        jmp     .add
Line 919... Line 947...
919
 
947
 
920
  .done:
948
  .done:
-
 
949
        call    draw_channel_list
Line 921... Line 950...
921
        call    draw_channel_list
950
  .fail:
Line 929... Line 958...
929
cmd_366:        ; channel usernames end
958
cmd_366:        ; channel usernames end
Line 930... Line 959...
930
 
959
 
931
        add     esi, 4          ; skip '366 '
960
        add     esi, 4          ; skip '366 '
932
        call    skip_parameter
961
        call    skip_parameter
933
        call    window_open
-
 
934
 
962
        call    window_open
-
 
963
        test    ebx, ebx
935
        mov     ebx, [window_print]
964
        jz      .fail
-
 
965
        and     [ebx + window.flags], not FLAG_RECEIVING_NAMES
Line 936... Line 966...
936
        and     [ebx + window.flags], not FLAG_RECEIVING_NAMES
966
  .fail:
Line 943... Line 973...
943
cmd_topic:
973
cmd_topic:
Line 944... Line 974...
944
 
974
 
945
        add     esi, 4          ; skip '332 '
975
        add     esi, 4          ; skip '332 '
946
        call    skip_parameter
976
        call    skip_parameter
-
 
977
        call    window_open
-
 
978
        test    ebx, ebx
Line 947... Line 979...
947
        call    window_open
979
        jz      .fail
948
 
980
 
949
        if TIMESTAMP
981
        if TIMESTAMP
Line 950... Line 982...
950
        call    print_timestamp
982
        call    print_timestamp
951
        end if
983
        end if
952
 
984
 
Line 953... Line 985...
953
        push    esi
985
        push    esi
954
        mov     esi, topic_header
986
        mov     esi, topic_header
Line 955... Line 987...
955
        call    print_text2
987
        call    print_asciiz
956
 
988
 
Line 957... Line 989...
957
        mov     esi, str_topic
989
        mov     esi, str_topic
958
        call    print_text2
990
        call    print_asciiz
-
 
991
 
-
 
992
        pop     esi
Line 959... Line 993...
959
 
993
        call    print_asciiz
Line 960... Line 994...
960
        pop     esi
994
 
Line 961... Line 995...
961
        call    print_text2
995
        mov     esi, str_topic_end
962
 
996
        call    print_asciiz
963
        mov     esi, str_topic_end
997
 
-
 
998
  .fail:
-
 
999
 
Line 964... Line 1000...
964
        call    print_text2
1000
        ret
965
 
1001
 
966
        ret
1002
 
Line 967... Line 1003...
967
 
1003
cmd_333:
968
 
1004
 
969
cmd_333:
1005
        add     esi, 4          ; skip '333 '
Line 970... Line 1006...
970
 
1006
        call    skip_parameter
971
        add     esi, 4          ; skip '333 '
1007
        call    window_open
Line 972... Line 1008...
972
        call    skip_parameter
1008
        test    ebx, ebx
973
        call    window_open
1009
        jz      .fail
974
 
1010
 
Line 975... Line 1011...
975
        if TIMESTAMP
1011
        if TIMESTAMP
976
        call    print_timestamp
1012
        call    print_timestamp
Line 977... Line 1013...
977
        end if
1013
        end if
-
 
1014
 
978
 
1015
        push    esi
Line -... Line 1016...
-
 
1016
        mov     esi, topic_header
-
 
1017
        call    print_asciiz
979
        push    esi
1018
 
Line 980... Line 1019...
980
        mov     esi, topic_header
1019
        mov     esi, str_setby
981
        call    print_text2
-
 
982
 
-
 
983
        mov     esi, str_setby
1020
        call    print_asciiz
-
 
1021
 
-
 
1022
        pop     esi
-
 
1023
        mov     bl, '!'
-
 
1024
        call    print_string
984
        call    print_text2
1025
 
-
 
1026
        mov     al, 10
-
 
1027
        call    print_char
-
 
1028
 
-
 
1029
  .fail:
985
 
1030
 
986
        pop     eax
1031
        ret
987
        mov     dl, '!'
1032
 
988
        call    print_text
1033
 
-
 
1034
 
-
 
1035
cmd_322:        ; LIST
-
 
1036
 
-
 
1037
        add     esi, 4
-
 
1038
        call    skip_parameter
Line 989... Line 1039...
989
 
1039
 
Line 990... Line 1040...
990
        mov     esi, str_newline
1040
        push    esi