1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
;Hello, and thank you for using the Chanlev Clear system. ;Once you preform the command /clearchanlev do nothing at quakenet, as it may cause you to disconnect. ; ;Use /clearchanlev #channel to remove everyone but yourself ;Use /clearchanlev -r #channel to remove everyone, thus removing Q from the channel. ;Use the d switch (-d or -rd) to show debug messages. ; ;For the command to succeed, you must: ;--Be on the channel. ;--Have Q on the channel ;--Have owner status (+n) on the channel alias clearchanlev { if ($network !=== QuakeNet) { echo -atgce info * /clearchanlev: Invalid network. | halt } if (!$1) || ((-* iswm $1) && (!$2)) { echo -agtce info * /clearchanlev: Insufficient parameters. | halt } if (-* !iswm $1) && (#* !iswm $1) { echo -atgce info * /clearchanlev: Invalid parameters. | halt } unset %cc.* set -s %cc.chan $iif(-* iswm $1,$2,$1) if (Q !ison %cc.chan) { echo -atgce info * /clearchanlev: No Q detected on $v2 $+ . | unset %cc.* | halt } if (-* iswm $1) { if (- == $1) { echo -atgce info * /clearchanlev: Invalid parameters. | halt } if (r isin $1) { if ($input(WARNING! This action is about to remove Q from your channel. $crlf $+ This action is irreversible. $crlf $crlf $+ Are you sure you want to continue?,ywd,WARNING - Are You Sure?) == $true) { set %cc.remove 1 } else { halt } } if (d isin $1) { set %cc.debug 1 echo -atgce info * /clearchanlev: Debug mode: ON. } } echo -atgce info * /clearchanlev: Initiating Clear Chanlev. who $me n%na if (%cc.debug) { echo -atgce info * /clearchanlev: Recieving own auth... } .enable #clearchanlev.who } #clearchanlev.who off raw 354:*:set %cc.myqacc $3 | halt raw 315:*:{ .timer 1 0 .disable #clearchanlev.who if (%cc.debug) { echo -atgce info * /clearchanlev: Own auth recieved. %cc.myqacc } .msg Q chanlev %cc.chan .enable #clearchanlev halt } #clearchanlev.who end #clearchanlev off on ^*:notice:*:?:{ if ($network == Quakenet) && ($nick == Q) { haltdef if (Known users on* iswm $1-) { halt } if (Username*Flags*Last join*Last changed iswm $1-) { set %cc.write 1 if (%cc.debug) { echo -atgce info * /clearchanlev: Recieving user list into % $+ cc.users... } halt } if (End of list. == $1-) { halt } if (Done. == $1) { halt } if (You do not have sufficient access on* iswm $1-) { unset %cc.* .timer 1 0 .disable #cc.* #clearchanlev echo -atgce info * /clearchanlev: Action stopped due to insufficient access. } if (Total:* iswm $1-) { if (%cc.write) { if (%cc.debug) { echo -atgce info * /clearchanlev: User list recieved. beginning to remove users. } cc.finish } else { unset %cc.* .timer 1 0 .disable #cc.* #clearchanlev echo -atgce info * /clearchanlev: Action stopped due to insufficient access. } halt } if ($1 == %cc.myqacc) { if (n !isin $2) { unset %cc.write echo -atgce info * /clearchanlev: You don't have the required access level on %cc.chan $+ . halt } if (%cc.remove) && (%cc.write) { if (%cc.debug) { echo -atgce info * /clearchanlev: Writing to var: %cc.myqacc } set %cc.users $addtok(%cc.users,$chr(35) $+ %cc.myacc,32) } } if (%cc.write) && ($1 != %cc.myqacc) { if (%cc.debug) { echo -atgce info * /clearchanlev: Writing to var: $1 } set %cc.users $addtok(%cc.users,#$1,32) } if ($numtok(%cc.users,32) == 18) { if (%cc.debug) { echo -atgce info * /clearchanlev: User list is over 18, remove 18 users. %cc.users } .timer 1 $iif(%cc.timer,$v1,0) .msg Q removeuser %cc.chan %cc.users inc -z %cc.timer 2 inc %cc.rounds unset %cc.users } } } #clearchanlev end alias -l cc.finish { if (%cc.debug) { echo -atgce info * /clearchanlev: removing $iif(%cc.rounds,remaining) $numtok(%cc.users,32) users. } .timer 1 $iif(%cc.timer,$v1,0) .msg Q removeuser %cc.chan %cc.users echo -atgce info * /clearchanlev: Successfuly removed $calc((18 * %cc.rounds ) + $numtok(%cc.users,32)) users on %cc.chan $+ . unset %cc.* .disable #clearchanlev* } |
| Parsed for bracket errors and indented: | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
;Hello, and thank you for using the Chanlev Clear system. ;Once you preform the command /clearchanlev do nothing at quakenet, as it may cause you to disconnect. ; ;Use /clearchanlev #channel to remove everyone but yourself ;Use /clearchanlev -r #channel to remove everyone, thus removing Q from the channel. ;Use the d switch (-d or -rd) to show debug messages. ; ;For the command to succeed, you must: ;--Be on the channel. ;--Have Q on the channel ;--Have owner status (+n) on the channel alias clearchanlev { if ($network !=== QuakeNet) { echo -atgce info * /clearchanlev: Invalid network. | halt } if (!$1) || ((-* iswm $1) && (!$2)) { echo -agtce info * /clearchanlev: Insufficient parameters. | halt } if (-* !iswm $1) && (#* !iswm $1) { echo -atgce info * /clearchanlev: Invalid parameters. | halt } unset %cc.* set -s %cc.chan $iif(-* iswm $1,$2,$1) if (Q !ison %cc.chan) { echo -atgce info * /clearchanlev: No Q detected on $v2 $+ . | unset %cc.* | halt } if (-* iswm $1) { if (- == $1) { echo -atgce info * /clearchanlev: Invalid parameters. | halt } if (r isin $1) { if ($input(WARNING! This action is about to remove Q from your channel. $crlf $+ This action is irreversible. $crlf $crlf $+ Are you sure you want to continue?,ywd,WARNING - Are You Sure?) == $true) { set %cc.remove 1 } else { halt } } if (d isin $1) { set %cc.debug 1 echo -atgce info * /clearchanlev: Debug mode: ON. } } echo -atgce info * /clearchanlev: Initiating Clear Chanlev. who $me n%na if (%cc.debug) { echo -atgce info * /clearchanlev: Recieving own auth... } .enable #clearchanlev.who } #clearchanlev.who off raw 354:*:set %cc.myqacc $3 | halt raw 315:*:{ .timer 1 0 .disable #clearchanlev.who if (%cc.debug) { echo -atgce info * /clearchanlev: Own auth recieved. %cc.myqacc } .msg Q chanlev %cc.chan .enable #clearchanlev halt } #clearchanlev.who end #clearchanlev off on ^*:notice:*:?:{ if ($network == Quakenet) && ($nick == Q) { haltdef if (Known users on* iswm $1-) { halt } if (Username*Flags*Last join*Last changed iswm $1-) { set %cc.write 1 if (%cc.debug) { echo -atgce info * /clearchanlev: Recieving user list into % $+ cc.users... } halt } if (End of list. == $1-) { halt } if (Done. == $1) { halt } if (You do not have sufficient access on* iswm $1-) { unset %cc.* .timer 1 0 .disable #cc.* #clearchanlev echo -atgce info * /clearchanlev: Action stopped due to insufficient access. } if (Total:* iswm $1-) { if (%cc.write) { if (%cc.debug) { echo -atgce info * /clearchanlev: User list recieved. beginning to remove users. } cc.finish } else { unset %cc.* .timer 1 0 .disable #cc.* #clearchanlev echo -atgce info * /clearchanlev: Action stopped due to insufficient access. } halt } if ($1 == %cc.myqacc) { if (n !isin $2) { unset %cc.write echo -atgce info * /clearchanlev: You don't have the required access level on %cc.chan $+ . halt } if (%cc.remove) && (%cc.write) { if (%cc.debug) { echo -atgce info * /clearchanlev: Writing to var: %cc.myqacc } set %cc.users $addtok(%cc.users,$chr(35) $+ %cc.myacc,32) } } if (%cc.write) && ($1 != %cc.myqacc) { if (%cc.debug) { echo -atgce info * /clearchanlev: Writing to var: $1 } set %cc.users $addtok(%cc.users,#$1,32) } if ($numtok(%cc.users,32) == 18) { if (%cc.debug) { echo -atgce info * /clearchanlev: User list is over 18, remove 18 users. %cc.users } .timer 1 $iif(%cc.timer,$v1,0) .msg Q removeuser %cc.chan %cc.users inc -z %cc.timer 2 inc %cc.rounds unset %cc.users } } } #clearchanlev end alias -l cc.finish { if (%cc.debug) { echo -atgce info * /clearchanlev: removing $iif(%cc.rounds,remaining) $numtok(%cc.users,32) users. } .timer 1 $iif(%cc.timer,$v1,0) .msg Q removeuser %cc.chan %cc.users echo -atgce info * /clearchanlev: Successfuly removed $calc((18 * %cc.rounds ) + $numtok(%cc.users,32)) users on %cc.chan $+ . unset %cc.* .disable #clearchanlev* } |