Advertisement
Xzempt

Untitled

Apr 16th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 25.65 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;This dialog was made, in its entirity, by me, Xzempt
  4. ;if you have this, you are obviously a friend that i
  5. ;trust wont give it out or claim it as their own work
  6. ;I' put alot of work in this dialog, to make things a
  7. ; bit easier for us all
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  10.  
  11.  
  12. ;;;;;;;;;;;;;;;;;;;;dialog table;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. dialog stat {
  15.   title "Ircop Stats Dialog"
  16.   size -1 -1 493 205
  17.   option dbu
  18. }
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;;;;;;;;;;;;popup menu;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  21.  
  22. menu * {
  23.   IRC Stats: st
  24. }
  25.  
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27. ;;;;;;;;;;;;alias to open the dialog;;;;;;;;;;;;;;;;;
  28.  
  29. alias st {
  30.   if ($dialog(stat)) {
  31.     dialog -x stat stat
  32.     dialog -ma stat stat
  33.   }
  34.   else {
  35.     dialog -ma stat stat
  36.   }
  37. }
  38.  
  39. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  40. ;;;;;;;;;;;;dialog initialization;;;;;;;;;;;;;;;;;;;;
  41.  
  42. on *:DIALOG:stat:INIT:*: {
  43.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  44.   ;;;;;;;;;;;;;;;marks the dialog;;;;;;;;;;;;;;;;;;;;
  45.  
  46.   var %x = $dcx( Mark,$dname statscallback)
  47.  
  48.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  49.   ;;;;;;;;;;;;;;dialog border;;;;;;;;;;;;;;;;;;;;;;;;
  50.   xdialog -b stat +s
  51.  
  52.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  53.   ;;;;;;;;;;;;;dialog background color;;;;;;;;;;;;;;;
  54.  
  55.   xdialog -g stat +b  $rgb(0,0,0)
  56.  
  57.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  58.   ;;;;;;;;;;;close and minimize button;;;;;;;;;;;;;;;
  59.  
  60.   xdialog -c stat 3 image 950 6 10 10
  61.   xdid -i stat 3 + $mircdirimages\min2.png
  62.   xdialog -c stat 1000 image 971 6 10 10
  63.   xdid -i stat 1000 + $mircdirimages\close.png
  64.  
  65.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  66.   ;;;;;;;;;;;;;;headers buttons and listview;;;;;;;;;
  67.  
  68.   xdialog -c $dname 1 listview 1 30 740 20 icon showsel autoarrange report grid fullrow multiline group
  69.   xdid -t $dname 1 +l 0 25 B $chr(9) +l 0 25 b  $chr(9) +l 0 25 C $chr(9) +l 0 25 d $chr(9) +l 0 25 D $chr(9) +l 0 25 e $chr(9) +l 0 25 E $chr(9) +l 0 25 f $chr(9) +l 0 25 F $chr(9) +l 0 25 G $chr(9) +l 0 25 I $chr(9) +l 0 25 j $chr(9) +l 0 25 K $chr(9) +l 0 25 L $chr(9) +l 0 25 M $chr(9) +l 0 25 n $chr(9) +l 0 25 O $chr(9) +l 0 25 P $chr(9) +l 0 25 Q $chr(9) +l 0 25 r $chr(9) +l 0 25 s $chr(9) +l 0 25 u $chr(9) +l 0 25 U $chr(9) +l 0 25 v $chr(9) +l 0 25 V $chr(9) +l 0 25 X $chr(9) +l 0 65 Spamfilter
  70.   xdialog -c $dname 2 listview 1 50 740 355  icon showsel autoarrange report grid fullrow multiline group  
  71.   xdid -t stat 2 +l 0 100 Network: $chr(9) +l 0 100 Nick: $chr(9) +l 0 300 Address: $chr(9) +l 0 200 Spammed:
  72.  
  73.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  74.   ;;;;;calls the alias to load the spam tracker;;;;;;
  75.  
  76.   spammed
  77.  
  78.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  79.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  80.  
  81.   xdialog -c $dname 4 check 780 50 10 10 smooth
  82.   xdialog -c $dname 5 check 780 65 10 10 smooth
  83.   xdialog -c $dname 6 check 780 80 10 10 smooth
  84.   xdialog -c $dname 7 check 780 95 10 10 smooth
  85.   xdialog -c $dname 8 check 780 110 10 10 smooth
  86.   xdialog -c $dname 9 check 890 50 10 10 smooth
  87.   xdialog -c $dname 10 check 890 65 10 10 smooth
  88.   xdialog -c $dname 11 check 890 80 10 10 smooth
  89.   xdialog -c $dname 12 check 890 95 10 10 smooth
  90.   xdialog -c $dname 13 check 890 110 10 10 smooth
  91.  
  92.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  93.   ;;;;;;;;;;;;;;;radio buttons ;;;;;;;;;;;;;;;;;;;;;;
  94.  
  95.   xdialog -c $dname 14 radio 780 165 10 10 smooth
  96.   xdid -C $dname 14 +b $rgb(0,0,0)
  97.   xdid -t $dname 14 kill
  98.   xdialog -c $dname 15 radio 780 180 10 10 smooth
  99.   xdid -C $dname 15 +b $rgb(0,0,0)
  100.   xdid -t $dname 15 tempshun
  101.   xdialog -c $dname 16 radio 780 195 10 10 smooth
  102.   xdid -C $dname 16 +b $rgb(0,0,0)
  103.   xdid -t $dname 16 shun
  104.   xdialog -c $dname 17 radio 780 210 10 10 smooth
  105.   xdid -C $dname 17 +b $rgb(0,0,0)
  106.   xdid -t stat 17 kline
  107.   xdialog -c $dname 18 radio 890 165 10 10 smooth
  108.   xdid -C $dname 18 +b $rgb(0,0,0)
  109.   xdid -t stat 18 zline
  110.   xdialog -c $dname 19 radio 890 180 10 10 smooth
  111.   xdid -C $dname 19 +b $rgb(0,0,0)
  112.   xdid -t stat 19 gzline
  113.   xdialog -c $dname 20 radio 890 195 10 10 smooth
  114.   xdid -C $dname 20 +b $rgb(0,0,0)
  115.   xdid -t stat 20 block
  116.   xdialog -c $dname 21 radio 890 210 10 10 smooth
  117.   xdid -C $dname 21 +b $rgb(0,0,0)
  118.   xdid -t stat 21 dccblock
  119.   xdialog -c $dname 23 radio 780 225 10 10 smooth
  120.   xdid -C $dname 23 +b $rgb(0,0,0)
  121.   xdid -t stat 23 gline
  122.   xdialog -c $dname 24 radio 890 225 10 10 smooth
  123.   xdid -C $dname 24 +b $rgb(0,0,0)
  124.   xdid -t stat 24 warn
  125.  
  126.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  127.   ;;;;edit boxes and default text thats in them;;;;;;
  128.  
  129.   xdialog -c $dname 47 edit 845 290 120 20 smooth autohs
  130.   xdid -C $dname 47 +b $rgb(255,255,255)
  131.   xdid -E stat 47 Enter a number + s for seconds, m fore minutes, h for hours or d for days
  132.   xdialog -T $dname +b
  133.   xdid -T $dname 47 Enter a number + s for seconds, m fore minutes, h for hours or d for days
  134.   xdialog -c $dname 48 edit 845 310 120 20 smooth autohs
  135.   xdid -C $dname 48 +b $rgb(255,255,255)
  136.   xdid -E stat 48 Enter A Reason
  137.   xdialog -c $dname 49 edit 845 330 120 20 smooth autohs
  138.   xdid -C $dname 49 +b $rgb(255,255,255)
  139.   xdid -E stat 49 Regular Expression
  140.  
  141.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  142.   ;;;;;;group boxes and their colors and text;;;;;;;;
  143.  
  144.   xdialog -c $dname 22 box 750 25 230 110 left rounded
  145.   xdid -t stat  22  Type:
  146.   xdid -C $dname 22 +b $rgb(0,0,0)  
  147.   xdid -C $dname 22 +t $rgb(130,192,255)
  148.   xdid -C $dname 22 +r $rgb(255,255,255)
  149.  
  150.   xdialog -c $dname 39 box 750 135 230 115 left rounded
  151.   xdid -t stat  39  Action:
  152.   xdid -C $dname 39 +b $rgb(0,0,0)  
  153.   xdid -C $dname 39 +t $rgb(130,192,255)
  154.   xdid -C $dname 39 +r $rgb(255,255,255)
  155.  
  156.   xdialog -c $dname 46 box 750 255 230 125 left rounded
  157.   xdid -t stat  46  Tkl - Reason - Regex:
  158.   xdid -C $dname 46 +b $rgb(0,0,0)  
  159.   xdid -C $dname 46 +t $rgb(130,192,255)
  160.   xdid -C $dname 46 +r $rgb(255,255,255)
  161.  
  162.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  163.   ;;;;checkboxes and text color;;;;;;;;;;;;;;;;;;;;;;
  164.  
  165.   xdialog -c $dname 40 text 800 50 60 15
  166.   xdid -C $dname 40 +b $rgb(0,0,0)  
  167.   xdid -C $dname 40 +t $rgb(130,192,255)
  168.   xdid -t $dname 40 Channel
  169.   xdid -C $dname 40 +r $rgb(130,192,255)
  170.  
  171.   xdialog -c $dname 25 text 800 65 60 15
  172.   xdid -C $dname 25 +b $rgb(0,0,0)  
  173.   xdid -C $dname 25 +t $rgb(130,192,255)
  174.   xdid -C $dname 25 +r $rgb(130,192,255)
  175.   xdid -t $dname 25 Private Msg
  176.  
  177.   xdialog -c $dname 26 text 800 80 90 15
  178.   xdid -t $dname 26 Private Notice
  179.   xdid -C $dname 26 +b $rgb(0,0,0)  
  180.   xdid -C $dname 26 +t $rgb(130,192,255)
  181.   xdid -C $dname 26 +r $rgb(130,192,255)
  182.  
  183.   xdialog -c $dname 27 text 800 95 90 15
  184.   xdid -t $dname 27 Part Msg
  185.   xdid -C $dname 27 +b $rgb(0,0,0)  
  186.   xdid -C $dname 27 +t $rgb(130,192,255)
  187.   xdid -C $dname 27 +r $rgb(130,192,255)
  188.  
  189.   xdialog -c $dname 28 text 800 110 90 15
  190.   xdid -t $dname 28 Channel Notice
  191.   xdid -C $dname 28 +b $rgb(0,0,0)  
  192.   xdid -C $dname 28 +t $rgb(130,192,255)
  193.   xdid -C $dname 28 +r $rgb(130,192,255)
  194.  
  195.   xdialog -c $dname 29 text 910 50 60 15
  196.   xdid -t $dname 29 Quit Msg
  197.   xdid -C $dname 29 +b $rgb(0,0,0)  
  198.   xdid -C $dname 29 +t $rgb(130,192,255)
  199.   xdid -C $dname 29 +r $rgb(130,192,255)
  200.  
  201.   xdialog -c $dname 30 text 910 65 60 15
  202.   xdid -t $dname 30 DCC
  203.   xdid -C $dname 30 +b $rgb(0,0,0)  
  204.   xdid -C $dname 30 +t $rgb(130,192,255)
  205.   xdid -C $dname 30 +r $rgb(130,192,255)
  206.  
  207.   xdialog -c $dname 31 text 910 80 60 15
  208.   xdid -t $dname 31 Away
  209.   xdid -C $dname 31 +b $rgb(0,0,0)  
  210.   xdid -C $dname 31 +t $rgb(130,192,255)
  211.   xdid -C $dname 31 +r $rgb(130,192,255)
  212.  
  213.   xdialog -c $dname 32 text 910 95 60 15
  214.   xdid -t $dname 32 Topic
  215.   xdid -C $dname 32 +b $rgb(0,0,0)  
  216.   xdid -C $dname 32 +t $rgb(130,192,255)
  217.   xdid -C $dname 32 +r $rgb(130,192,255)
  218.  
  219.   xdialog -c $dname 33 text 910 110 60 15
  220.   xdid -t $dname 33 User
  221.   xdid -C $dname 33 +b $rgb(0,0,0)  
  222.   xdid -C $dname 33 +t $rgb(130,192,255)
  223.   xdid -C $dname 33 +r $rgb(130,192,255)
  224.  
  225.   xdialog -c $dname 34 text 800 165 60 15
  226.   xdid -t $dname 34 Kill
  227.   xdid -C $dname 34 +b $rgb(0,0,0)  
  228.   xdid -C $dname 34 +t $rgb(130,192,255)
  229.   xdid -C $dname 34 +r $rgb(130,192,255)
  230.  
  231.   xdialog -c $dname 35 text 800 180 60 15
  232.   xdid -t $dname 35 Temp Shun
  233.   xdid -C $dname 35 +b $rgb(0,0,0)  
  234.   xdid -C $dname 35 +t $rgb(130,192,255)
  235.   xdid -C $dname 35 +r $rgb(130,192,255)
  236.  
  237.   xdialog -c $dname 36 text 800 195 60 15
  238.   xdid -t $dname 36 Shun
  239.   xdid -C $dname 36 +b $rgb(0,0,0)  
  240.   xdid -C $dname 36 +t $rgb(130,192,255)
  241.   xdid -C $dname 36 +r $rgb(130,192,255)
  242.  
  243.   xdialog -c $dname 37 text 800 210 60 15
  244.   xdid -t $dname 37 K:Line
  245.   xdid -C $dname 37 +b $rgb(0,0,0)  
  246.   xdid -C $dname 37 +t $rgb(130,192,255)
  247.   xdid -C $dname 37 +r $rgb(130,192,255)
  248.  
  249.   xdialog -c $dname 38 text 800 225 60 15
  250.   xdid -t $dname 38 G:Line
  251.   xdid -C $dname 38 +b $rgb(0,0,0)  
  252.   xdid -C $dname 38 +t $rgb(130,192,255)
  253.   xdid -C $dname 38 +r $rgb(130,192,255)
  254.  
  255.   xdialog -c $dname 41 text 910 165 60 15
  256.   xdid -t $dname 41 Z:Line
  257.   xdid -C $dname 41 +b $rgb(0,0,0)  
  258.   xdid -C $dname 41 +t $rgb(130,192,255)
  259.   xdid -C $dname 41 +r $rgb(130,192,255)
  260.  
  261.   xdialog -c $dname 42 text 910 180 60 15
  262.   xdid -t $dname 42 GZ:Line
  263.   xdid -C $dname 42 +b $rgb(0,0,0)  
  264.   xdid -C $dname 42 +t $rgb(130,192,255)
  265.   xdid -C $dname 42 +r $rgb(130,192,255)
  266.  
  267.   xdialog -c $dname 43 text 910 195 60 15
  268.   xdid -t $dname 43 Block
  269.   xdid -C $dname 43 +b $rgb(0,0,0)  
  270.   xdid -C $dname 43 +t $rgb(130,192,255)
  271.   xdid -C $dname 43 +r $rgb(130,192,255)
  272.  
  273.   xdialog -c $dname 44 text 910 210 60 15
  274.   xdid -t $dname 44 DCC Block
  275.   xdid -C $dname 44 +b $rgb(0,0,0)  
  276.   xdid -C $dname 44 +t $rgb(130,192,255)
  277.   xdid -C $dname 44 +r $rgb(130,192,255)
  278.  
  279.   xdialog -c $dname 45 text 910 225 60 15
  280.   xdid -t $dname 45 Warn
  281.   xdid -C $dname 45 +b $rgb(0,0,0)  
  282.   xdid -C $dname 45 +t $rgb(130,192,255)
  283.   xdid -C $dname 45 +r $rgb(130,192,255)
  284.  
  285.   xdialog -c $dname 50 text 800 295 60 15
  286.   xdid -C $dname 50 +b $rgb(0,0,0)  
  287.   xdid -C $dname 50 +t $rgb(130,192,255)
  288.   xdid -t $dname 50 Tkl Time:
  289.   xdid -C $dname 50 +r $rgb(130,192,255)
  290.  
  291.   xdialog -c $dname 51 text 800 315 60 15
  292.   xdid -C $dname 51 +b $rgb(0,0,0)  
  293.   xdid -C $dname 51 +t $rgb(130,192,255)
  294.   xdid -C $dname 51 +r $rgb(130,192,255)
  295.   xdid -t $dname 51 Reason:
  296.  
  297.   xdialog -c $dname 52 text 800 335 90 15
  298.   xdid -t $dname 52 RegEx:
  299.   xdid -C $dname 52 +b $rgb(0,0,0)  
  300.   xdid -C $dname 52 +t $rgb(130,192,255)
  301.   xdid -C $dname 52 +r $rgb(130,192,255)
  302.  
  303.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  304.   ;;;;;;;;;;button control and its imagefile;;;;;;;;;
  305.  
  306.   xdialog -c stat 53 button 820 385 100 20 bitmap
  307.   ;xdid -k $dname 53 +nhs $rgb(255,255,255) $mircdirimages\button.png
  308.  
  309.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  310.   ;checkbox text fore targeting events for spamfilter
  311.  
  312.   xdid -t stat 4 c
  313.   xdid -t stat 5 p
  314.   xdid -t stat 6 n
  315.   xdid -t stat 7 P
  316.   xdid -t stat 8 N
  317.   xdid -t stat 9 q
  318.   xdid -t stat 10 d
  319.   xdid -t stat 11 a
  320.   xdid -t stat 12 t
  321.   xdid -t stat 13 u
  322.  
  323.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  324.   ;;;;;;;;;;;timer to refocus the controls;;;;;;;;;;;
  325.  
  326.   .timerfocus -m 1 100 focus
  327.  
  328.   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  329.   ;;this ensures the ban file is clean when the dialog opens;;;;;;;;;;;;;;;;;
  330.  
  331.   .remove statsg.txt
  332. }
  333. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  334. ;;;;;;;;;;;;;;;;;this is setting focus on all the radio/checkboxes;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  335.  
  336. alias focus {
  337.   xdid -F stat 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,47,48,49,53 +c 100
  338. }
  339.  
  340. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  341. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;dialog call back alias;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  342. on *:DIALOG:stat:0:lbdown:
  343. alias statscallback {
  344.   ;echo -a $1-
  345.   if ($1 == stat) {
  346.     if (($xdialog(stat).key & 1) && ($mouse.bd != $true)) {
  347.       if (($2 == mouse) && ($3 == 0)) { ;dcx m_pBEGINMOVE $mouse.dx $mouse.dy } ;  nosize ;}
  348.     }
  349.   }
  350.   if ($2 == close) {
  351.     if ($3 == 0) {
  352.       unset %did | unset %type* | unset %act | unset %time | unset %reason | unset %regex
  353.     }
  354.   }
  355.  
  356.   if (($2 == activate) && ($3 = 0)) {
  357.     .timerrefocus -m 1 100 focus
  358.   }
  359.   if ($2 == rclick) {
  360.     if ($3 == 5) {
  361.       akickmenu
  362.     }
  363.     if (($3 == 2) && (%did == G)) {
  364.       statsg
  365.     }
  366.     if ($xdid(stat,2,6).htext == Regex:) {
  367.       sfilter
  368.     }  
  369.   }
  370.   if ($2 == sclick) {
  371.     if ($3 == 1000) {
  372.       dialog -x stat stat
  373.     }
  374.     if ($3 == 3) {
  375.       xdialog -n stat stat
  376.     }
  377.     if ($3 == 53) {
  378.       gettype | gettoks | getact | gettime | getreason | getregex
  379.     }
  380.   }
  381.   if (($2 == trackbegin) && ($3 == 1)) {
  382.     return notrack
  383.   }
  384.   if (($3 == 1) && ($4 == 27) && ($2 == hrclick)) {
  385.     chkspam
  386.   }
  387.   if (($2 == hsclick) && ($3 == 1)) {
  388.     if (($4 != 27) && ($4 != 10)) {
  389.       .remove statsg.txt
  390.       xdid -r stat 2
  391.       stats $xdid(stat,1,$4).htext
  392.       set %did $xdid(stat,1,$4).htext
  393.     }
  394.     elseif ($4 == 10) {
  395.       .remove statsg.txt
  396.       xdid -r stat 2
  397.       stats G
  398.       stats k
  399.       stats s
  400.       set %did G
  401.     }
  402.     elseif (($4 == 27) && ($2 != hrclick) && ($2 != close)) {
  403.       xdid -r stat 2
  404.       .remove statsg.txt
  405.       xdid -t stat 2 +l 0 100 Network: $chr(9) +l 0 100 Nick: $chr(9) +l 0 300 Address: $chr(9) +l 0 200 Spammed:
  406.       spammed
  407.     }
  408.   }
  409. }
  410.  
  411.  
  412. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  413. ;;;;;;;;;;;;;;;;;;;;;;;;;spamfilter target aliases;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  414.  
  415. alias gettype {
  416.   %x = 4
  417.   while (%x <= 13) {
  418.     if ($xdid(stat,%x).state == 1) {
  419.       set %type $addtok(%type,$xdid(stat,%x).text,32)
  420.     }
  421.     inc %x
  422.   }
  423.   else {
  424.     inc %x
  425.   }
  426. }
  427.  
  428. alias gettoks {
  429.   $iif(($xdid(stat,7).state == 1) && ($xdid(stat,8).state != 1),set %type2 $addtok(%type2,P,32),$null)
  430.   $iif(($xdid(stat,8).state == 1) && ($xdid(stat,7).state != 1),set %type2 $addtok(%type2,N,32),$null)
  431.   $iif(($xdid(stat,8).state == 1) && ($xdid(stat,7).state == 1),set %type2 $addtok(%type2,PN,32),$null)
  432. }
  433.  
  434. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  435. ;;;;;;;;;;;;;;;;;;;;;;;;;spamfilter action to take;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  436.  
  437. alias getact {
  438.   %ga = 14
  439.   while (%ga <= 24) {
  440.     if (%ga == 22) {
  441.       inc %ga
  442.     }
  443.     if ($xdid(stat,%ga).state == 1) {
  444.       set %act $xdid(stat,%ga).text
  445.       inc %ga
  446.     }
  447.     else {
  448.       inc %ga
  449.     }
  450.   }
  451. }
  452.  
  453. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  454. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;spamfilter tkl time;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  455.  
  456. alias gettime {
  457.   if (!$xdid(stat,47).text) {
  458.     set %time -
  459.   }
  460.   if ($xdid(stat,47).text) {
  461.     set %time $xdid(stat,47).text
  462.   }
  463. }
  464.  
  465. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  466. ;;;;;;;;;;;;;;;;;;;;;;;;;spamfilter reason;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  467.  
  468. alias getreason {
  469.   if (!$xdid(stat,48).text) {
  470.     set %reason -
  471.   }
  472.   if ($xdid(stat,48).text) {
  473.     set %reason $xdid(stat,48).text
  474.   }
  475. }
  476.  
  477. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  478. ;;;;;;;;;;;;;;;;;;;;;;;;;;spamfilter regex;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  479.  
  480. alias getregex {
  481.   if ($xdid(stat,49).text) {
  482.     set %regex $xdid(stat,49).text | setfilter
  483.   }
  484. }
  485.  
  486. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  487. ;;;;;;;;;;;;;this puts all the spamfilter aliases together and adds the spamfilter;;;;;;;;;;;;;;;
  488.  
  489. alias setfilter {
  490.   spamfilter add $remove(%type,$chr(32)) $+ %type2 %act %time %reason %regex | unset %type*
  491. }
  492.  
  493. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  494. ;;;;;;;;;the right click menu when you right click spamfilter at the top of the dialog;;;;;;;;;;;
  495.  
  496. alias chkspam {
  497.   if ($xpopup(spammed).ismenu) xpopup -d spammed
  498.   xpopup -c spammed normal
  499.   xpopup -p spammed $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(124,124,124) $rgb(0,0,0) $rgb(0,0,0) $Rgb(255,255,255)
  500.   xpop -a spammed 1  $chr(9) +s 0 1 Spam File
  501.   xpop -a spammed 1 1 $chr(9) + 125 3 Clear
  502.   xpopup -s spammed +c $calc($mouse.dx + 55) $mouse.dy
  503. }
  504.  
  505. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  506. ;;;;;;;;;;;;;;;;;listview spamfilter remove popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  507.  
  508. alias sfilter {
  509.   if ($xpopup(spf).ismenu) xpopup -d spf
  510.   if ($dialog(stat)) {
  511.     xpopup -c spf normal
  512.     xpopup -p spf $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(124,124,124) $rgb(0,0,0) $rgb(0,0,0) $Rgb(255,255,255)
  513.     xpop -a spf 1  $chr(9) + 200 1 Remove Spamfilter
  514.     xpop -a spf 2 $chr(9) + 201 3 Add Spamfilter
  515.     xpopup -s spf +c $calc($mouse.dx + 55) $mouse.dy
  516.   }
  517. }
  518. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  519. ;;;;;;;;;;;;;;;;gline/shun/zline/kline popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  520.  
  521. alias statsg {
  522.   if ($xpopup(stg).ismenu) xpopup -d stg
  523.   if ($dialog(stat)) {
  524.     xpopup -c stg normal
  525.     xpopup -p stg $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(0,0,0) $rgb(124,124,124) $rgb(0,0,0) $rgb(0,0,0) $Rgb(255,255,255)
  526.     xpop -a stg 1  $chr(9) + 202 1 Remove Ban
  527.     xpop -a stg 2 $chr(9) + 203 3 Add Ban
  528.     xpopup -s stg +c $calc($mouse.dx + 55) $mouse.dy
  529.   }
  530. }
  531.  
  532. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  533. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;popup menu actions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  534.  
  535. ON *:SIGNAL:Xpopup-*: {
  536.   var %m $gettok($signal, 2-, 45)
  537.   if ($1 == 0) {
  538.     return
  539.   }
  540.   if (%m == spf) {
  541.     if ($1 == 200) {
  542.       spamfilter del $xdid(stat,2,2).seltext $xdid(stat,2,3).seltext - $xdid(stat,2,4).seltext $xdid(stat,2,6).seltext
  543.       xdid -d stat 2 $xdid(stat,2).sel
  544.     }
  545.     elseif ($1 == 201) {  }
  546.   }
  547.   if (%m == stg) {
  548.     if ($1 == 202) {
  549.       if (Z isincs $xdid(stat,2,1).seltext) {
  550.         gzline - $+ $xdid(stat,2,2).seltext
  551.         xdid -d stat 2 $xdid(stat,2).sel
  552.       }
  553.       if  (z isincs $xdid(stat,2,1).seltext) {
  554.         zline - $+ $xdid(stat,2,2).seltext
  555.         xdid -d stat 2 $xdid(stat,2).sel
  556.       }
  557.       if  (G isincs $xdid(stat,2,1).seltext) {
  558.         gline - $+ $xdid(stat,2,2).seltext
  559.         xdid -d stat 2 $xdid(stat,2).sel
  560.       }
  561.       if  (s isincs $xdid(stat,2,1).seltext) {
  562.         shun - $+ $xdid(stat,2,2).seltext
  563.         xdid -d stat 2 $xdid(stat,2).sel
  564.       }
  565.     }
  566.   }
  567.   if (%m == spammed) {
  568.     if ($1 == 125) {
  569.       .remove spammed.txt
  570.       xdid -r stat 2
  571.       timerfocus -m 1 100 focus
  572.     }
  573.   }
  574. }
  575.  
  576. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  577. ;;;;;;;;;;;;;;;;;;;raws for loading text into the dialog;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  578.  
  579. raw *:*: {
  580.   if ($dialog(stat)) {
  581.     if (($numeric == 223) || ($numeric == 216)) {
  582.       set -u3 %223 on
  583.       write statsg.txt $2-
  584.     }
  585.     elseif ($numeric == 229) {
  586.       set -u3 %229 on
  587.       write statsg.txt $2-
  588.     }
  589.     elseif ($numeric == 210) {
  590.       set -u3 %229 on
  591.       write statsg.txt $2-
  592.     }
  593.     elseif ($numeric == 304) {
  594.       set -u3 %304 on
  595.       write statsg.txt $2-
  596.     }
  597.     elseif ($numeric == 213) {
  598.       set -u3 %213 on
  599.       write statsg.txt $3 $5-
  600.     }
  601.     elseif (($numeric == 211) && (SendQ !isin $2)) {
  602.       set -u3 %211 on
  603.       write statsg.txt $2-
  604.     }
  605.     elseif (($numeric == 219) && (%223)) {
  606.       loadlist
  607.     }
  608.     elseif (($dialog(stat)) && (%304) && (!%216)) {
  609.       xdid -r stat 2
  610.       xdid -t stat 2 +l 0 65 Target:  $chr(9) +l 0 125 Flag: $chr(9) +l 0 110 Word: $chr(9) +l 0 150 Replace With:
  611.       var %stats 1
  612.       while (%stats <= $lines(statsg.txt)) {
  613.         xdid -a stat 2 1 0 +b -1 0 0 0 $rgb(255,255,255) $rgb(0,0,0) $gettok($+($read($+(statsg.txt),%stats),$crlf),1,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),2,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),3,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),4,32)
  614.         inc %stats
  615.       }
  616.       .remove statsg.txt
  617.     }
  618.     elseif (($dialog(stat)) && (%213) && (!%216)) {
  619.       xdid -r stat 2
  620.       xdid -t stat 2 +l 0 95 Address:  $chr(9) +l 0 125 Server: $chr(9) +l 0 110 Port: $chr(9) +l 0 150 Class:
  621.       var %stats 1
  622.       while (%stats <= $lines(statsg.txt)) {
  623.         xdid -a stat 2 1 0 +b -1 0 0 0 $rgb(255,255,255) $rgb(0,0,0) $gettok($+($read($+(statsg.txt),%stats),$crlf),1,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),2,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),3,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),4-,32)
  624.         inc %stats
  625.       }
  626.     }
  627.     elseif (($dialog(stat)) && (%229) && (!%216)) {
  628.       xdid -r stat 2
  629.       xdid -t stat 2 +l 0 55 Flag:  $chr(9) +l 0 100 Target: $chr(9) +l 0 110 Action: $chr(9) +l 0 150 Reason: $chr(9) +l 0 150 Set By: $chr(9) +l 0 150 Regex:  
  630.       var %stats 1
  631.       while (%stats <= $lines(statsg.txt)) {
  632.         xdid -a stat 2 1 0 +b -1 0 0 0 $rgb(255,255,255) $rgb(0,0,0) $gettok($+($read($+(statsg.txt),%stats),$crlf),1,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),2,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),3,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),7,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),8,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),9-,32)
  633.         inc %stats
  634.       }
  635.       .remove statsg.txt
  636.     }
  637.     elseif (($dialog(stat)) && (%211) && (!%216)) {
  638.       xdid -r stat 2
  639.       xdid -t stat 2 +l 0 255 SendQ:  $chr(9) +l 0 125 SendM: $chr(9) +l 0 110 SendBytes: $chr(9) +l 0 150 RcveM: $chr(9) +l 0 150 RcveBytes: $chr(9) +l 0 150 Open Since: $chr(9) +l 0 150 Idle:  
  640.       var %stats 1
  641.       while (%stats <= $lines(statsg.txt)) {
  642.         xdid -a stat 2 1 0 +b -1 0 0 0 $rgb(255,255,255) $rgb(0,0,0) $gettok($+($read($+(statsg.txt),%stats),$crlf),1,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),2,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),3,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),4,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),5,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),6,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $duration($gettok($read(statsg.txt,%stats),7,32))
  643.         inc %stats
  644.       }
  645.       .remove statsg.txt
  646.     }
  647.   }
  648. }
  649.  
  650. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  651. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;load ban list;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  652.  
  653. alias loadlist .timerloadlist 1 1 listload
  654. alias listload {
  655.   xdid -t stat 2 +l 0 45 Flag:  $chr(9) +l 0 125 Mask: $chr(9) +l 0 110 Ban Length: $chr(9) +l 0 100 Banned For: $chr(9) +l 0 200 Set By: $chr(9) +l 0 200 Reason:
  656.   var %stats 1
  657.   while (%stats <= $lines(statsg.txt)) {
  658.     xdid -a stat 2 1 0 +b -1 0 0 0 $rgb(255,255,255) $rgb(0,0,0) $gettok($read(statsg.txt,%stats),1,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($read(statsg.txt,%stats),2,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $duration($gettok($read(statsg.txt,%stats),3,32)) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $duration($gettok($read(statsg.txt,%stats),4,32)) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$crlf),5,32) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(statsg.txt),%stats),$chr(160)),6-,32)
  659.     inc %stats
  660.   }
  661. }
  662.  
  663. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  664. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;load spam tracker;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  665.  
  666. alias spammed {
  667.   %x = 1
  668.   while (%x <= $lines(spammed.txt)) {
  669.     xdid -a stat 2 1 0 +b -1 0 0 0 $rgb(255,255,255) $rgb(0,0,0) $gettok($+($read($+(spammed.txt),%x),$crlf),1,33) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(spammed.txt),%x),$crlf),2,33) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(spammed.txt),%x),$crlf),3,33) $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $gettok($+($read($+(spammed.txt),%x),$crlf),4-,33)
  670.     inc %x
  671.   }
  672. }
  673.  
  674. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  675. ;;;;;;;;;;;;;;;;;this keeps track of who has spammed;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  676.  
  677. on *:SNOTICE:*: {
  678.   if (($1 == [Spamfilter])  && ($3 == matches)) {
  679.     write spammed.txt $network $+ ! $+ $2 $+ ! $+ $6 $7 $8-
  680.   }
  681. }
  682.  
  683. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  684. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement