SHARE
TWEET

code

a guest Apr 16th, 2014 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on !*:join:#:{
  2. msg # $nick welcome to the channel
  3. }
  4.  
  5. alias doaddpoints {
  6.   if ($3 !isnum) { echo 2 -st $3 is not a number. it needs to be a number. | halt }
  7.   var %topic $+(,.,$2)
  8.   var %points $calc($readini(points.ini,%topic,points) + $3 )
  9.   writeini -n points.ini %topic points %points
  10.   echo -a added points for %topic
  11. }
  12. alias -l addpoints {
  13.   if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
  14.   var %topic $+($chan,.,$nick)
  15.   var %points $calc($readini(points.ini,%topic,points) + $1)
  16.   writeini -n points.ini %topic points %points
  17.   return %points
  18. }
  19. alias -l lookUppoints {
  20.   var %topic $+($chan,.,$nick)
  21.   var %points $readini(points.ini,%topic,points)
  22.   return %points
  23. }
  24. alias doaddpoints {
  25.   if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
  26.   var %topic $+($1,.,$2)
  27.   var %points $calc($readini(points.ini,%topic,points) + $3)
  28.   writeini -n points.ini %topic points %points
  29.   echo -a Added points for %topic
  30. }
  31. alias dorempoints {
  32.   var %topic $+($1,.,$2)
  33.   remini -n points.ini %topic points
  34.   echo -a Removed points for %topic
  35. }
  36. on *:text:!points:#:{
  37.   if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
  38.   set -u10 %floodpoints On
  39.   set -u30 %floodpoints. $+ $nick On
  40.   msg # $nick has $readini(points.ini,$+(#,.,$nick),points) total points.
  41. }
  42. on $*:text:/!points (add|remove)/Si:#:{
  43.   if ($nick isop # ) {
  44.     if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
  45.     writeini -n points.ini $+(#,.,$3) points $calc($readini(points.ini,$+(#,.,$3),points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  46.     { msg $chan $3 now has $readini(points.ini,$+(#,.,$3),points) points. }
  47.   }
  48.   else { msg $chan YOU ARE NOT WORTHY. }
  49. }
  50.  
  51. on !*:join:#:{
  52.   $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
  53.   add.pts $+(#,.,$nick)
  54. }
  55. on !*:part:#:$+(.timerpoints.,#,.,$nick) off
  56. alias -l add.pts {
  57.   writeini -n points.ini $1 points $calc($readini(points.ini,$1,points) + 1)
  58. }
  59. on *:TEXT:!pson:#: {
  60.   if ($nick isop #) {
  61.     msg $chan points are now being earned
  62.     .timerpoints on
  63.   }
  64. }
  65. on *:TEXT:!psoff:#: {
  66.   if ($nick isop #) {
  67.     msg $chan the point system is now off
  68.     .timerpoints off
  69.   }
  70. }
  71.  
  72.  
  73.  
  74.  
  75. on !*:text:*:#:{
  76.   if ($nick isop #) { return }
  77.   if ( $len($1-) >= 10 ) {
  78.     if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) {
  79.  
  80.       ; check if user is not warned yet
  81.       if !$istok(%caps.warned,$nick,32) {
  82.  
  83.         ; warning user      
  84.         msg $chan $nick -> stop typing in caps! [warning]
  85.  
  86.         ; add user to %caps.warned, so we can check it later
  87.         set -e %caps.warned $addtok(%caps.warned,$nick,32)
  88.  
  89.         ; set timer to remove user from %caps.warned after 300s
  90.         .timer 1 300 remove.warned $nick
  91.       }
  92.       else {
  93.         msg # /timeout $nick 10
  94.       }
  95.     }
  96.   }
  97. }
  98.  
  99. alias -l remove.warned {
  100.   set -e %caps.warned $remtok(%caps.warned,$1,1,32)
  101. }
  102.  
  103.  
  104.  
  105.  
  106.  
  107. on @*:text:*:#:linkpost $1-
  108. on @*:action:*:#:linkpost $1-
  109. on @*:notice:*:#:linkpost $1-
  110. alias -l linkpost {
  111.   if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p
  112.     var %purge /^!(link\so(n|ff)|(permit))\b/iS
  113.     var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk
  114.     var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS
  115.     if ($findtok(%chanon1,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
  116.       timeout # $nick | /mode # -b $nick
  117.       msg # $nick You did not have permission to post a link ask a mod to !permit you
  118.       msg # /timeout $nick 1
  119.     }
  120.     elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) {
  121.       hadd -mz permit $v1 30 | notice $v1 You have 30 seconds to post a link. Starting now!
  122.       msg # You now have 30 seconds to post a link!
  123.     }
  124.     elseif (($regml(1) = link on) && ($nick isop #)) {
  125.       goto $iif(!$istok(%chanon1,#,32),a,b) | :a | set %chanon1 $addtok(%chanon,#,32)
  126.       .msg # My Link Protection Is Now on in: $+($chr(2),#)
  127.       halt | :b | .msg # $nick $+ , my link protection is already on in $&
  128.         $+($chr(2),#,$chr(2)) !
  129.     }
  130.     elseif (($regml(1) = link off) && ($nick isop #)) {
  131.       goto $iif($istok(%chanon1,#,32),c,d) | :c | set %chanon1 $remtok(%chanon,#,1,32)
  132.       .msg # My Link Protection Is Now off in: $+($chr(2),#)
  133.       halt | :d | .msg # $nick $+ , My link protection is already off . $&
  134.         !
  135.     }
  136.   }
  137. }
  138.  
  139.  
  140.  
  141. on $*:text:/^!commandedit !?(\S+)/iS:#:{
  142.   if ($nick !isop #) return
  143.   writeini commands.ini commands $regml(1) $$3-
  144.   msg # your command has been edit'ed
  145. }
  146.  
  147. on $*:text:/^!commandadd !?(\S+)/iS:#:{
  148.   if ($nick !isop #) return
  149.   writeini commands.ini commands $regml(1) $$3-
  150.   msg # your command has been add'ed
  151. }
  152.  
  153. on $*:text:/^!commandremove !?(\S+)/iS:#:{
  154.   if ($nick !isop #) return
  155.   remini commands.ini commands $regml(1)
  156.   msg # your command has been removed
  157. }
  158.  
  159. on $*:text:/^!repeat !?(\S+) (off|\d+)/iS:#:{
  160.   if ($nick !isop #) return
  161.  
  162.   var %command = $regml(1), %interval = $regml(2)
  163.  
  164.   if ($timer(command. $+ %command)) {
  165.     if (%interval == off) .timercommand. $+ %command off
  166.     else msg # ! $+ %command is already repeating
  167.   }
  168.   elseif ($readini(commands.ini,n,commands,%command)) {
  169.     var %response = $v1
  170.     .timercommand. $+ %command 0 $iif(%interval < 5,5,%interval) msg # $safe(%response)
  171.     msg # %response
  172.   }
  173. }
  174.  
  175. on $*:text:/^!(\S+)/:#:{
  176.   if ($nick !isop #) return
  177.   if ($readini(commands.ini,n,commands,$regml(1))) msg # $v1
  178. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top