Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. /*
  2. Events
  3. */
  4. on ^*:text:*:*: {
  5. if (($highlight($1-)) && (!$botcheck($nick))) { var %output -lti $+ $calc($len($timestampfmt) +1) }
  6. else { var %output -mti $+ $calc($len($timestampfmt) +1) }
  7. haltdef
  8. echo %output $iif($chan,$v1,$nick) $+(<,$iif($nick($chan,$nick).pnick,$v1,$nick,>) $1-
  9. }
  10.  
  11. on ^*:action:*:*: {
  12. if (($highlight($1-)) && (!$botcheck($nick))) { var %output -lti $+ $calc($len($timestampfmt) +1) }
  13. else { var %output -mti $+ $calc($len($timestampfmt) +1) }
  14. haltdef
  15. echo %output $iif($chan,$v1,$nick) * $nick $1-
  16. }
  17.  
  18. on ^*:notice:*:*: {
  19. haltdef
  20. echo -amti $+ $calc($len($timestampfmt) +1) $+(-,$nick,$iif($chan,$+(:,$v1),),-) $1-
  21. }
  22.  
  23. on ^*:input:*: {
  24. if (($left($1,1) != /) || (($left($1,1) == /) && ($ctrlenter))) {
  25. !.msg $active $1-
  26. echo -ati $+ $calc($len($timestampfmt) +1) $+(<,$iif($nick($chan,$me).pnick,$v1,$me),>) $1-
  27. }
  28. }
  29.  
  30. on ^*:rawmode:#: {
  31. haltdef
  32. echo -ti $+ $calc($len($timestampfmt) +1) $chan $nick sets mode: $1-
  33. }
  34.  
  35. on ^*:join:#: {
  36. if ($nick == $me) {
  37. echo -ti $+ $calc($len($timestampfmt) +1) $chan * Joined $chan
  38. }
  39. haltdef
  40. echo -ti $+ $calc($len($timestampfmt) +1) $chan * $nick ( $+ $replace($address,@,@,.,.,-,-) $+ ) has joined $chan
  41. }
  42.  
  43. on ^*:part:#: {
  44. if ($nick != $me) {
  45. haltdef
  46. echo -ti $+ $calc($len($timestampfmt) +1) $chan * $nick ( $+ $replace($address,@,@,.,.,-,-) $+ ) has left $chan $iif($1-,$+($chr(40),$v1,$chr(41)),)
  47. }
  48. }
  49.  
  50. on ^*:kick:#: {
  51. haltdef
  52. echo -ti $+ $calc($len($timestampfmt) +1) $chan $nick kicked $knick ( $+ $1- $+ )
  53. }
  54.  
  55. on ^*:quit: {
  56. haltdef
  57. var %a = $comchan($nick,0), %b = 1
  58. while (%b <= %a) {
  59. echo -ti $+ $calc($len($timestampfmt) +1) $comchan($nick,%b) * $nick ( $+ $replace($address,@,@,.,.,-,-) $+ ) quits ( $+ $1- $+ )
  60. inc %b
  61. }
  62. }
  63.  
  64. on *:topic:#: {
  65. haltdef
  66. echo -ti $+ $calc($len($timestampfmt) +1) $chan * $nick changes the topic to: $1-
  67. }
  68.  
  69. /*
  70. Aliases
  71. */
  72. alias amsg {
  73. !.amsg $1-
  74. var %chans = 1, %msg = $1-
  75. while (%chans <= $chan(0)) {
  76. tokenize 32 $chan(%chans) %msg
  77. echo -ti $+ $calc($len($timestampfmt) +1) $1 $+(<,$nick($1,$me).pnick,>) $2-
  78. inc %chans
  79. }
  80. }
  81.  
  82. alias msg {
  83. !.msg $1-
  84. if ($me ison $1) || ($query($1)) {
  85. echo -ti $+ $calc($len($timestampfmt) +1) $iif($chan,$v1,$nick) $+(<,$iif($nick($chan,$me).pnick,$v1,$me),>) $2-
  86. }
  87. else {
  88. echo -ati $+ $calc($len($timestampfmt) +1) $2- sent to: $1
  89. }
  90. }
  91.  
  92. 8
  93. alias say {
  94. !.msg $active $1-
  95. echo -ati $+ $calc($len($timestampfmt) +1) $+(<,$iif($nick($chan,$me).pnick,$v1,$me),>) $1-
  96. }
  97.  
  98. alias ame {
  99. !.ame $1-
  100. var %chans = 1, %desc = $1-
  101. while (%chans <= $chan(0)) {
  102. tokenize 32 $chan(%chans) %desc
  103. echo -ti $+ $calc($len($timestampfmt) +1) $1 * $me $2-
  104. inc %chans
  105. }
  106. }
  107.  
  108. alias describe {
  109. !.describe $1-
  110. if ($me ison $1) || ($query($1)) {
  111. echo -ti $+ $calc($len($timestampfmt) +1) $iif($chan,$v1,$nick) * $me $2-
  112. }
  113. else {
  114. echo -ati $+ $calc($len($timestampfmt) +1) * $me $2- sent to: $1
  115. }
  116. }
  117.  
  118. alias me {
  119. !.describe $active $1-
  120. echo -ti $+ $calc($len($timestampfmt) +1) $iif($chan,$v1,$nick) * $me $1-
  121. }
  122.  
  123. alias notice {
  124. !.notice $1-
  125. echo -ati $+ $calc($len($timestampfmt) +1) $+(-,$1,->) $2-
  126. }
  127.  
  128. alias botcheck {
  129. ;if (...) { return 1 }
  130. ;else { return 0 }
  131. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement