Advertisement
intersys

Untitled

Apr 21st, 2018
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.35 KB | None | 0 0
  1. alias clearchanlev {
  2.   if ($3-) { set %protected $3- }
  3.   if ($left($1,1) == $chr(35)) && ($network == QuakeNet) {
  4.     unset %temp | unset %zxx | unset %mylevel | unset %clea*
  5.     if ($2) {
  6.       if (!%clearing) && (!%clear1) {
  7.         if ($left($2,1) == $chr(43)) || ($left($2,1) == $chr(45)) { set -u60 %clear $1 $remove($2,$left($2,1)) }
  8.         else { set -u60 %clear $1 $2 }
  9.         .timercheckwhat 1 5 checkwhat | set %clear1 1 | .msg q chanlev $1 | set %mylevel $remove($address($me,2),*!*@,.users.quakenet.org) | set %clearing 1 | set -u15 %zxx 1
  10.       }
  11.       elseif (%clearing) || (%clear1) { echo -agce info * Error! During a clearing!
  12.       }
  13.     }
  14.     else { echo -agce info * Error! Please use: /clearchanlev <#chan> <level>/<+level>/<-level> | halt
  15.     }
  16.   }
  17.   else {
  18.     echo -agce info * Error! Either you didnt typed $chr(35) , or you are not using the network "quakenet". | halt
  19.   }
  20. }
  21. on *:notice:*:?:{
  22.   if ($nick == Q) && (%clear1) {
  23.     haltdef
  24.     if (%clearing) {
  25.       if (*You do not have sufficient access on* iswm $1-) { echo -agce info * Error! you dont have enough acsses on $gettok(%clear,1,32) to use chanlev. | unset %clearing | .timercheckwhat off | .timera* off | halt }
  26.       if (*is unknown or suspended* iswm $1-) { echo -agce info * Error! channel is unknown or suspended. | .timercheckwhat off | .timera* off | unset %clearing | halt }
  27.       if (*known* !iswm $1-) && (*username* !iswm $1-) && ($1 != %mylevel) && (n !isin $2) && ($1 !isin %protected) {
  28.         if ($left($2,1) == $chr(43)) && ($gettok(%clear,2,32) isin $2) && (n !isin $2) { set %temp %temp $chr(35) $+ $1 }
  29.         if ($numtok(%temp,32) == 18) { .timera $+ %zxx 1 %zxx .msg q removeuser $gettok(%clear,1,32) %temp | unset %temp | inc %zxx 2 }
  30.       }
  31.       if (*End of* iswm $1-) { unset %clearing | halt }
  32.       if (Total: iswm $1) { unset %clearing | halt }
  33.     }
  34.   }
  35. }
  36.  
  37. alias checkwhat {
  38.   var %zzz = $calc(%zxx -4)
  39.   if ($numtok(%temp,32) < 18) && ($numtok(%temp,32) >= 1) { .timer 1 %zzz .msg q removeuser $gettok(%clear,1,32) %temp | .timer 1 $calc(%zzz +2) echo -agce info * Clearing ended. | unset %temp | unset %zxx | unset %mylevel | .timer 1 $calc(%zzz +4) unset %clea* | unset %protected }
  40.   elseif ($numtok(%temp,32) == 0) { unset %mylevel | unset %zxx | echo -agce info * Error! No one has the level: " $+ $chr(43) $+ $gettok(%clear,2,32) $+ " | unset %zxx | unset %clea* | halt }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement