Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on !*:join:#: {
- var %bl.network = $gettok($read($qt($mircdirBlacklist.lst)),3,126)
- if ($network != %bl.network) { halt }
- else {
- if ($nick ison $gettok($read($qt($mircdirBlacklist.lst)),2,126)) {
- ; We know the user if on list, will be kicked from specified channels,
- ; now to find the user if they have been blacklisted
- var %bl.nickhost = $gettok($read($qt($mircdirBlacklist.lst)),1,126)
- var %bl.reason = $gettok($read($qt($mircdirBlacklist.lst)),4,126)
- if (%bl.nickhost == $null) { halt }
- ban $chan %bl.nickhost | kick $chan $nick Blacklisted - Reason: %bl.reason
- }
- else {
- halt
- }
- }
- }
- alias blacklist {
- if ($1 == add) {
- if ($2 == $null) { echo -a Please specify the Nickname/Hostname to blacklist. | halt }
- if ($3 == $null) { echo -a Please specify the channel user is blacklisted from: | halt }
- if ($4 == $null) { echo -a Please specify the network NAME the blacklist will trigger on: | halt }
- if ($5 == $null) { echo -a Please specify a reason for the blacklisted user: | halt }
- var %nick = $read($qt($mircdirBlacklist.lst), w, $+(*,$2,*))
- var %bl.netwk = $4
- if (%bl.netwk == iwwfnet) { var %bl.netwk = IWWFNet }
- if (%bl.netwk == efnet) { var %bl.netwk = EFNet }
- if (%bl.netwk == dalnet) { var %bl.netwk = DALNet }
- if (%bl.netwk == undernet) { var %bl.netwk = UnderNet }
- if (%nick == $null) {
- write $qt($mircdirBlacklist.lst) $2 $+ ~ $+ $3 $+ ~ $+ %bl.netwk $+ ~ $+ $5-
- echo -a 7( $+ $2 $+ 7) has been Blacklisted on the 7( $+ %bl.netwk $+ 7) Network with the reason 7( $+ $5- $+ 7)
- echo -a User is Blacklist Monitored on channel 7( $+ $3 $+ 7)
- if ($2 ison $chan) { kick $chan $nick }
- }
- else {
- echo -a $2 is already on the Blacklist
- }
- }
- if ($1 == chans) {
- if ($2- == $null) { echo -a Specify the channels with the # and spaces between them. }
- set %bl.chans %bl.chans $2- | echo -a Channels now monitored: %bl.chans
- }
- if ($1 == del) {
- if ($2 == $null) {
- echo -a Please specify the Nickname/Hostname to remove from the Blacklist.
- }
- else {
- $read($qt($mircdirBlacklist.lst), w, $2)
- var %x = $readn
- write -dl $+ %x $qt($mircdirBlacklist.lst)
- echo -a Removed $2 from the Blacklist
- }
- }
- if ($1 == list) {
- var %count = 1 | echo -a Current Blacklisted Users
- if ($lines($mircdirBlacklist.lst) == 0) { echo -a None }
- while (%count <= $lines($qt($mircdirBlacklist.lst))) {
- echo -a User: $gettok($read($qt($mircdirBlacklist.lst), %count),1,126) - Channel Blacklisted From: $gettok($read($qt($mircdirBlacklist.lst), %count),2,126)
- echo -a Server Affected: $gettok($read($qt($mircdirBlacklist.lst), %count),3,126) - Blacklisted: $gettok($read($qt($mircdirBlacklist.lst), %count),4,126)
- inc %count
- }
- }
- if ($1 == clear) {
- if $exists($qt($mircdirBlacklist.lst)) {
- echo -a Blacklist has been wiped.
- remove $qt($mircdirBlacklist.lst)
- }
- else {
- echo -a No blacklist exists at this time, make one if you want.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement