- on *:text:!request*:#ohnoes:{
- if ($ulvl($auth($nick),$chan) == 8) {
- if ($2 == set) {
- if (!$3) { .notice $nick Wrong setting, syntax: !request set on/off | halt }
- if ($3 == on) || ($3 == off) { .notice $nick Request has been turned $3 | set %request $3 } | else { .notice $nick Wrong setting, syntax: !request set on/off | halt }
- }
- if ($2 == status) { .notice $nick Request is actually %request | halt }
- }
- if (%request == off) { msg # Request temporaly 4 OFF . | halt }
- if (%request == on) {
- if ($ini(request.ini,suspended,$2)) { msg # Channel $2 is suspended, for info type !info | halt }
- if (!$auth($nick)) { msg # You must be authed and have +x setted | halt }
- if (*!*@*users.quakenet.org !iswm $address($nick,5)) { msg # You must be Authed and have +x setted | halt }
- if (%requesting == on) { msg # Request in process, please try again in minute. | halt }
- if ($me ison $2) { msg # I am already on $2 $+ . | halt }
- if (!$2) { msg # Syntax: !request #channel | halt }
- if ($timer(request)) { msg # Request in process, please try again in minute. | halt }
- if ($left($2,1) != $chr(35)) { if ($2 == set) { halt } else { msg # Channel Name must start with $chr(35) | halt } }
- set %requester $nick
- set %channeltorequest $2
- set %requesting on
- if ($ini(request.ini,react,$2)) { writeini $inifile react $2 0 }
- joinchan
- }
- }
- alias joinchan {
- join %channeltorequest
- timerrequest 1 2 checkforuser
- }
- alias checkforuser {
- if (%requester ison %channeltorequest) {
- checkifop
- }
- elseif (%requester !ison %channeltorequest) {
- msg #ohnoes %requester $+ : You're not on %channeltorequest - 4request failed
- unsetall
- $+(.timer(checkflag.,$1)) off
- halt
- }
- }
- alias checkifop {
- if (%requester !isop %channeltorequest) {
- msg #ohnoes %requester $+ : You need to be op'd in %channeltorequest - 4request failed
- unsetall
- $+(.timer(checkflag.,$1)) off
- halt
- }
- elseif (%requester isop %channeltorequest) {
- checkq
- }
- }
- alias checkq {
- if (Q !ison %channeltorequest) {
- msg #ohnoes %requester $+ : Q must be in on %channeltorequest - 4request failed
- unsetall
- $+(.timer(checkflag.,$1)) off
- halt
- }
- elseif (Q ison %channeltorequest) {
- checkusers
- }
- }
- alias checkusers {
- if (wowbot ison %channeltorequest) { inc %qnetbots }
- if (triviabot ison %channeltorequest) { inc %qnetbots }
- if (snailbot ison %channeltorequest) { inc %qnetbots }
- if (fishbot ison %channeltorequest) { inc %qnetbots }
- if ($nick(%channeltorequest,0) < $calc( 12 + %qnetbots )) {
- msg #ohnoes %requester $+ : There is not enought users in %channeltorequest (minimum 10 realusers) - 4request failed
- unsetall
- $+(.timer(checkflag.,$1)) off
- halt
- }
- elseif ($nick(%channeltorequest,0) >= $calc( 12 + %qnetbots )) {
- msg #ohnoes %requester $+ : 9Request passed , $me should already be there, Do not forget to add $me +op on %channeltorequest ( 7/msg Q chanlev %channeltorequest $me +ao )
- unset %requester
- unset %channeltorequest
- set %requesting off
- }
- }
- alias unsetall {
- part %channeltorequest
- unset %requester
- unset %channeltorequest
- set %requesting off
- set %qnetbots 0
- }
- raw *:*: {
- if (%requesting == on) {
- if ($istok(471 473 474 475 477 479,$numeric,32)) {
- if ($numeric == 471) { var %r = channel is full +l }
- elseif ($numeric == 473) { var %r = channel is invite only +i }
- elseif ($numeric == 474) { var %r = I am banned +b }
- elseif ($numeric == 475) { var %r = channel key is set +k }
- else { var %r = channel is G-lined: $left($7-,-1) }
- msg #ohnoes %requester $+ : Following modes were setted: %r which is not allowed - 4request failed
- $+(.timer(checkflag.,$1)) off
- timerrequest off
- set %requesting off
- }
- } }
- on *:kick:#: {
- if (%requesting == on) {
- if ($knick == $me) && (%channeltorequest == $chan) {
- $+(.timer(checkflag.,$1)) off
- timerrequest off
- set %requesting off
- msg #ohnoes %requester $+ : I've been kicked while chcking requirements - 4request failed
- } } }
- on *:ban:#: {
- if (%requesting == on) {
- if ($banmask iswm $address($me,5)) {
- $+(.timer(checkflag.,$1)) off
- timerrequest off
- set %requesting off
- msg #ohnoes %requester $+ : I've been banned while chcking requirements - 4request failed
- part %channeltorequest
- } } }
- on *:text:!rules:#ohnoes: {
- msg # To request bot You must be authed and have +x setted. Your channel must have Quakenet service (Q) and minimum 10 users on (not including Q and $me $+ or fish,snail,wow,trivia).
- msg # You must be OP/@ in channel and have access to add bot to Q, channel can't be secret, invite, or passworded means: no modes that would disturb in request.
- }
- on *:text:!suspend*:#: {
- if ($ulvl($auth($nick),$chan) == 8) {
- if ($2 == list) {
- if (%antispam) { halt }
- if (!$ini(request.ini,suspended,0)) { .notice $Nick No suspended channels. | halt }
- var %x 1
- set -u10 %antispam
- while (%x <= $ini(request.ini,suspended,0)) {
- timer $+ %x 1 %x .notice $nick Channel: $chr(35) $+ %x $+ . $ini(request.ini,suspended,%x) Reason: $readini(request.ini,suspended,$ini(request.ini,suspended,%x))
- inc %x
- }
- }
- if ($chan == #ohnoes) {
- if ($2 == list) { halt }
- if ($left($2,1) != $chr(35)) { .notice $nick Channel Name must start with $chr(35) | halt }
- if (!$2) { .notice $nick Syntax: !suspend #chan <reason> | halt }
- if (!$3) { writeini request.ini $2 Not setted. }
- else {
- writeini request.ini suspended $2 $3-
- .notice $nick Done. Suspended channel $2 with reason $3-
- if ($me ison $2) { part $2 Channel suspended by admin, reason: $3- }
- }
- }
- if ($chan != #ohnoes) {
- if (!$2) { .notice $nick Syntax: !suspend <reason> - suspends active channel | halt }
- writeini request.ini suspended # $2-
- .notice $Nick Done. Suspended channel # with reason $2-
- part $chan Channel suspended by admin, reason: $2-
- }
- }
- }
- on *:text:!unsuspend*:#: {
- if ($ulvl($auth($nick),$chan) == 8) {
- if (!$2) { .notice $nick Syntax: !unsuspend #channel | halt }
- if ($left($2,1) != $chr(35)) { .notice $nick Channel Name must start with $chr(35) | halt }
- if (!$ini(request.ini,suspended,$2)) { .notice $nick No such channel in suspends list. | halt }
- if ($ini(request.ini,suspended,$2)) { remini request.ini suspended $2 | .notice $nick Done. Unsuspended channel $2 }
- }
- }
- on *:text:!info*:#ohnoes: {
- if (!$2) { msg # Syntax: !info #channel | halt }
- if ($left($2,1) != $chr(35)) { msg # Channel Name must start with $chr(35) | halt }
- if (!$ini(request.ini,suspended,$2)) { msg # $nick $+ : Channel ( $+ $2 $+ ) is NOT suspended. | halt }
- if ($ini(request.ini,suspended,$2)) { msg # $nick $+ : Channel ( $+ $2 $+ ) is suspended with reason: $readini(request.ini,suspended,$2) }
- else { halt }
- }
- alias -l inifile { return request.ini }
- alias -l developmentchannel { return #ohnoes }
- alias -l totalstrike { return 3 }
- on *:join:#: {
- if ($nick == $me) {
- if (%requesting == on) {
- .checktimer %channeltorequest
- } } }
- alias checktimer {
- if ($ini($inifile,knownchans,%channeltorequest)) { halt }
- if ($readini($inifile,react,$1) => $totalstrike) {
- if ($me ison $1) {
- part $1 No flags added, channel suspended. | writeini request.ini suspended $1 Flagsless on Q.
- }
- $+(.timer(checkflag.,$1)) off
- msg $developmentchannel Strike out on $+($chr(2),$1,$chr(2)) - I'm parting the channel.
- return
- }
- if (!$timer(checkflag. [ $+ [ $1 ] ])) {
- $+(.timer.checkflag.,$1) 1 180 checktimer $1
- .msg Q chanlev $1
- }
- }
- on *:NOTICE:*:?: {
- if ($nick == Q) {
- if (*You do not have sufficient access on* iswm $1-) {
- .writeini $inifile react $8 $calc($readini($inifile,react,$8)+1)
- msg $developmentchannel I have no flags on $+($chr(2),$8,$chr(2)) Strike: $+($chr(2),$readini($inifile,react,$8),$chr(2),/,$chr(2),$totalstrike,$chr(2))
- }
- }
- }
Undefined
By: Guest | Date: Oct 9 2022 13:54 | Format: None | Expires: never | Size: 8.11 KB | Hits: 235
Latest pastes
1 days ago
2 days ago
4 days ago
6 days ago
6 days ago