Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:LOAD: {
- if (!%checkautobantime) {
- set %checkautobantime $?="Give me time (in seconds) for ban when the nick is not on the list..." }
- if (!%checkautochannel) {
- set %checkautochannel $?="What channel do you want me to monitor? ex. #Hellas-Opers" }
- if (!%autocheckaccess) {
- if ($$?!="Would you like to enable Access On Channel?" == $true) { set %autocheckaccess 1 }
- if (!%checkabarnetowrk) {
- set %checkabarnetowrk $?="Please give me the exact name of the network to make me work." }
- }
- ;Please Do Not Remove The Following Lines
- ECHO -a 10*************************************************
- ECHO -a 3-
- ECHO -a 7 This is a remote to manage Access on Oper's Channel
- ECHO -a 7
- ECHO -a 7 ............................ Created by 4Mr_Me 7.........
- ECHO -a 7
- ECHO -a 7 .......... For 10Q-Net 7.....................................
- ECHO -a 7
- Echo -a 5 ..........-- == Thanks Goes To westor == --..........
- ECHO -a 3-
- ECHO -a 10*************************************************
- }
- ON *:UNLOAD: { unset %checkautobantime %checkautochannel %autocheckaccess %checkabarnetowrk }
- menu Channel {
- Access On Channel
- .$iif(%autocheckaccess,$style(1)) ON : {
- set %autocheckaccess 1
- echo -a 7Access On Channel is14: 3ON 7.
- if (!%checkautobantime) {
- :secs_again
- var %s = $?="Give me time (in seconds) for ban when the nick is not on the list..."
- if (!%s) { var %error = $input(Please specify a number!,houd,Error) | goto secs_again }
- if (%s !isnum) { var %error = $input(Please specify only numbers!,houd,Error) | goto secs_again }
- set %checkautobantime %s
- echo -a 7Time is now set for 14 :: 3 %checkautobantime
- }
- if (!%checkautochannel) {
- :chan_again
- var %c = $?="What channel do you want me to monitor? (ex. #Hellas-Opers)"
- if (!%c) { var %error = $input(Please specify a channel!,houd,Error) | goto chan_again }
- if ($left(%c,1) !== $chr(35)) { var %error = $input(Please specify again the channel and insert the '#' character in front of the channel name!,houd,Error) | goto chan_again }
- if ($numtok(%c,32) !== 1) { var %error = $input(Please specify only 1 channel!,houd,Error) | goto chan_again }
- if ($numtok(%c,44) !== 1) { var %error = $input(Please specify only 1 channel $+ $chr(44) you can't enter more than 1 channel!,houd,Error) | goto chan_again }
- set %checkautochannel %c
- echo -a 7Monitor is now set for 14 :: 3 %checkautochannel
- }
- }
- .$iif(!%autocheckaccess,$style(1)) OFF : set %autocheckaccess 0 | echo -a 7Access On Channel is now14: 4OFF 7.
- .-
- .Add (1) Nick: write names.txt $?="Nickname?"
- .Add (++) Nick: {
- :MORENICKS
- write names.txt $?="Nickname?"
- if ( $$?!="Would you like to add one more Nickname?" == $true ) { goto MORENICKS }
- }
- .Preview name list: PreviewAccessList
- .Open name list:run names.txt
- .Clear (ALL) name list: {
- var %t = $lines(names.txt)
- if (!%t) { var %error = $input(There are NOT any nicknames on the list.,wodb,Warning) | return }
- var %ask = $input(Do you want to clear the currently list? $crlf $crlf $+ $+ Total Nicknames: %t,qidb,Question)
- if (%ask) {
- write -c names.txt
- var %ok = $input(The list has been cleared.,oidb,OK)
- }
- }
- .-
- .Change Time: {
- var %enter = $input(Enter here the time $chr(40) $+ in seconds $+ $chr(41) for ban when the nick is NOT in the list...,eidb,Enter)
- if (!%enter) { return }
- if (%enter == %checkautobantime) { var %same = $input(The seconds that you have gave are the same as now $+ $chr(44) try to give an other number,wodb,Warning) | return }
- var %old = $iif(%checkautobantime,$v1,N/A)
- set %checkautobantime %enter
- var %ok = $input(The seconds has been changed. $crlf $crlf $+ $+ Old: %old $crlf $crlf $+ $+ New: %enter,oidb,OK)
- ; echo -a 7Time is now set for 14 :: 4 %checkautobantime
- }
- .Change Network: set %checkabarnetowrk $?="Please give me the exact name of the network to make me work."
- .Change Channel: set %checkautochannel $?="What channel do you want me to monitor? (ex. #Hellas-Opers)" | echo -a 7Monitor is now set for 14 :: 4 %checkautochannel
- .-
- .Check Settings: checkingsettingsABAR
- }
- menu nicklist {
- -
- $iif($read(names.txt,ntw,$$1),$style(2)) Add On Access List:write -dw $+ $$1 names.txt | write names.txt $$1
- $iif(!$read(names.txt,ntw,$$1),$style(2)) Del From Access List:write -dw $+ $$1 names.txt
- -
- }
- ON !*:JOIN:%checkautochannel: {
- if (!%autocheckaccess) { return }
- if ($read(names.txt,ntw,$nick)) { return }
- if ($network == %checkabarnetowrk) {
- mode # +b $nick $+ !*@*
- .timer[ $+ $nick $+ ] 1 %checkautobantime mode # -b $nick $+ !*@*
- kick # $nick You are not allowed to join this channel... - BAN TIME - %checkautobantime seconds
- }
- }
- alias PreviewAccessList {
- var %w = @Preview.Access.List
- window -a %w
- clear %w
- var %t = $lines(names.txt)
- if (!%t) { aline -pl %w ***** There is NOT any nickname into the list. ***** | return }
- var %x = 1
- while (%x <= %t) { aline -pl %w $ord(%x) -> $read(names.txt,%x) | inc %x }
- }
- menu @Preview.Access.List {
- Reload Access List : { PreviewAccessList }
- ADD
- .Add (1) Nick: {
- var %n = $?="Nickname?"
- if ($read(names.txt,ntw,%n)) { var %error = $input(This nickname is already into the list!,houd,Error) | return }
- write names.txt %n
- PreviewAccessList
- }
- .Add (++) Nick: {
- :MORENICKS2
- var %n = $?="Nickname?"
- if ($read(names.txt,ntw,%n)) { var %error = $input(This nickname is already into the list!,houd,Error) | goto next }
- write names.txt %n
- PreviewAccessList
- :next
- if ( $$?!="Would you like to add one more Nickname?" == $true ) { goto MORENICKS2 }
- }
- $iif(!$isfile(names.txt),$style(2)) Open Name List: run names.txt
- $iif(!$isfile(names.txt),$style(2)) Clear (ALL) name list: write -c names.txt | previewaccesslist
- Checking Settings: checkingsettingsABAR
- -
- Close:window -c @Preview.Access.List
- -
- }
- alias checkingsettingsABAR {
- var %w = @Preview.Access.List
- window -a %w
- clear %w
- aline -pl %w 10
- aline -pl %w 10========================================
- aline -pl %w 10-
- aline -pl %w 10CHECKING SETTINGS .....
- aline -pl %w 10
- aline -pl %w 7Time is now set for 14 :: 4 %checkautobantime 7seconds
- aline -pl %w 7Monitor is now set for 14 :: 4 %checkautochannel
- aline -pl %w 7Monitor is set for 14:: 4 %checkabarnetowrk
- aline -pl %w 10-
- aline -pl %w 10========================================
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement