SHARE
TWEET

Untitled

a guest Sep 13th, 2017 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on *:connect:{
  2.   if ($network != GameSurge) { halt }
  3.   %masters = *!*@kun.is-high-on.gamesurge
  4.   var %x = 1
  5.   while ($gettok(%Channels,%x,32)) {
  6.     join $v1
  7.     inc %x
  8.   }
  9. }
  10. on *^:text:*:#:{
  11.   var %trig = .
  12.   var %cmd = $upper($left($remove($1,%trig),1)) $+ $lower($right($remove($1,%trig),-1))
  13.   var %msgtype = notice
  14.   if ($istok(%masters,$wildsite,32)) { var %level = 500 }
  15.   else { var %level = 1 }
  16.  
  17.  
  18.   echo -s blah: %trig $+ nick - %level
  19.  
  20.   if (%msgtype == msg) { var %msg = msg $chan }
  21.   elseif (%msgtype == notice) { var %msg = notice $nick }
  22.  
  23.  
  24.   if ($1 == %trig $+ Join) && (%level == 500) {
  25.     if ($0 != 2 || !$2 || , isin $2) {
  26.       var %error = Syntax: %trig $+ Join <Channel>
  27.       %msg [[ $+ %cmd $+ ]] %error
  28.     }
  29.     else {
  30.       join $2
  31.       %Channels = $addtok(%Channels,$2,32)
  32.       %msg [[ $+ %cmd $+ ]] Done.
  33.     }
  34.   }
  35.   elseif ($1 == %trig $+ Leave) && (%level == 500) {
  36.     if ($0 != 2) {
  37.       var %error = Syntax: %trig $+ Part <Channel>
  38.       %msg [[ $+ %cmd $+ ]] %error
  39.     }
  40.     else {
  41.       part $2
  42.       %msg [[ $+ %cmd $+ ]] Done.
  43.     }
  44.   }
  45.   elseif ($1 == %trig $+ Nick) && (%level == 500) {
  46.     echo -s blaaaaaa
  47.     if ($0 != 2) {
  48.       var %error = Syntax: %trig $+ Handle <NewNick>
  49.       %msg [[ $+ %cmd $+ ]] %error
  50.     }
  51.     else {
  52.       nick $2
  53.       %msg [[ $+ %cmd $+ ]] Done.
  54.     }
  55.   }
  56.   elseif ($1 == %trig $+ Timer) && (%level == 500) {
  57.     if ($0 < 4) {
  58.       var %error = Syntax: %trig $+ Timer <Repeat> <Delay> <Command>
  59.       %msg [[ $+ %cmd $+ ]] %error
  60.     }
  61.     else {
  62.       var %x = 1, %y
  63.       while ($timer(%x)) {
  64.         if ($chan $+ _* iswm $v1) inc %y
  65.         inc %x
  66.       }
  67.       inc %y
  68.       .timer $+ $chan $+ _ $+ %y $2-
  69.       %msg .timer $+ $chan $+ _ $+ %y $2-
  70.       %msg [[ $+ %cmd $+ ]] Timer Set.
  71.     }
  72.   }
  73.   elseif ($1 == %trig $+ TimerOff) && (%level == 500) {
  74.     if ($0 != 2) {
  75.       var %error = Syntax: %trig $+ Timeroff <Number>
  76.       %msg [[ $+ %cmd $+ ]] %error
  77.     }
  78.     else {
  79.       .timer $+ $chan $+ _ $+ $2 off
  80.       %msg [[ $+ %cmd $+ ]] Timer Off.
  81.     }
  82.   }
  83.   elseif ($1- == %trig $+ Timers) && (%level == 500) {
  84.     if ($timer(0)) { %msg -Timers- }
  85.     else { %msg [[ $+ %cmd $+ ]] No Timer Active. }
  86.     var %x = 1, %y
  87.     while ($timer(%x)) {
  88.       if ($chan $+ _* iswm $v1) { %msg [[ $+ %x $+ ]] $timer(%x).com }
  89.       inc %x
  90.     }
  91.   }
  92.   elseif ($1 == %trig $+ set) && (%level == 500) {
  93.     if (Greeting* iswm $2) {
  94.       if ($0 < 3) {
  95.         var %error = Syntax: %trig $+ Set Greeting<Num> <value>
  96.         %msg [[ $+ %cmd $+ ]] %error
  97.       }
  98.       else {
  99.         var %num = $regsubex($2,/Greeting/i,$null)
  100.         set %Greeting $+ %num $+ _ $+ $chan $3-
  101.         if ($3- == *) { .timer 1 0 unset % $+ greeting $+ %num $+ _ $+ $chan }
  102.         %msg [[ $+ %cmd $+ ]] Done.
  103.       }
  104.     }
  105.  
  106.   }
  107.   elseif ($1- == %trig $+ greetings) && (%level == 500) {
  108.     var %x = 1, %y
  109.     while ($var(*,%x)) {
  110.       if (% $+ greeting*_ $+ $chan iswm $v1) {
  111.         if ($regex($v2,/(\d+)/)) { %y = $regml(1) }
  112.         %msg [[ $+ Greeting $+ %y $+ ]] $($v2,2)
  113.       }
  114.       inc %x
  115.     }
  116.     if (!%y) { %msg [[ $+ %cmd $+ ]] None Set. }
  117.   }
  118.   elseif ($1- == %trig $+ Commands) && (%level == 500) {
  119.     var %commands = .Join .Leave .Nick - .timer .timers .timeroff - .Set Greeting<Num>
  120.     %msg [[ $+ %cmd $+ ]] %commands
  121.   }
  122. }
  123.  
  124. on *:join:#:{
  125.   if ($nick != $me) {
  126.     var %x = 1
  127.     while ($var(*,%x)) {
  128.       if (% $+ greeting*_ $+ $chan iswm $v1) { notice $nick $($v2,2) }
  129.       inc %x
  130.     }
  131.   }
  132. }
RAW Paste Data
Top