This is a simple blacklist script for bots or yourself.
!blacklist ;; adds a channel to the blacklist
!deblacklist ;; removes a channel of the blacklist
!blist ;; returns the blacklisted channels and if the channel your on or the requested channel is blacklisted at the moment.
Its obvious that the channel isnt blacklisted if you can trigger the command on the channel itself. I included it anyways.
Change #staffchan in your own channel.
goes fast by: CTRL + F then put searchterm #staffchan and replace with #ownchannel
Post bellow for fixes and feedback.
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;; **Blacklist Script** ;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;
;;; ;;;;;;; ;;;;;;;;; ;;;;;;;;;; *Version 1.12* ;;;;;;;;;; ;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; *Made By: Bielie© ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;; ;;;;;;;;; ;;;;;; *Change #Staffchan ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; in ur own channel* ;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
#blacklist on
on $*:text:/^[!.@]blacklist/:#:{
if (%flood [ $+ [ $nick ] ]) { return }
set -eu3 %flood [ $+ [ $nick ] ] $true
;;; %random is a value for the writeini's. Without it, it doesnt work
var %random = 1
;;only ops may use this command. Change this to anything u like. (Example: !ishop !isvoice)
if ($nick !isop #staffchan) {
notice $nick You have to be an op to use this command.
halt
}
;;its possible to change the notice.
if ($2- == $null) {
notice $nick Please provide a channel to add.
halt
}
;;its possible to change the notice.The others shouldent be changed.
if (%blacklist [ $+ [ $2- ] ]) {
notice $nick This channel already is on the blacklist! Type !deblacklist <#channel> to remove it.
set %blacklist [ $+ [ $2- ] ] $true
writeini -n Blacklist.ini Blacklist $2- %random
halt
}
;;its possible to change the notice.The others shouldent be changed.
if (!%blacklist [ $+ [ $2- ] ]) {
notice $nick Added $2- to the blacklist. The bot wont join this channel untill its deleted.
scon -a msg $2- 14This channel has been added to the 6blacklist14. Parting in6 3 14seconds....
.timer 1 3 scon -a part $2- 2Blacklisted
set %blacklist [ $+ [ $2- ] ] $true
writeini -n Blacklist.ini Blacklist $2- %random
halt
}
}
on $*:text:/^[!.@]deblacklist/:#:{
if (%flood [ $+ [ $nick ] ]) { return }
set -eu3 %flood [ $+ [ $nick ] ] $true
;;only ops may use this command. Change this to anything u like. (Example: !ishop !isvoice)
if ($nick !isop #staffchan) {
notice $nick You have to be an op to use this command.
halt
}
;;its possible to change the notice.
if ($2- == $null) { notice $nick $color1 $+ Please provide a channel to delete. | halt }
;;its possible to change the notice.The others shouldent be changed.
if (%blacklist [ $+ [ $2- ] ]) {
notice $nick $2- is now deleted of the blacklist.
unset %blacklist [ $+ [ $2- ] ]
/remini blacklist.ini Blacklist $2-
halt
}
;;its possible to change the notice.The others shouldent be changed.
if (!%blacklist [ $+ [ $2- ] ]) {
notice $nick I couldnt find $2 on the blacklist.
unset %blacklist [ $+ [ $2- ] ]
/remini blacklist.ini Blacklist $2-
halt
}
}
;;its possible to change the notice.The others shouldent be changed.
on $*:text:/^[!.@]blist/:#:{
if (%flood [ $+ [ $nick ] ]) { return }
set -eu3 %flood [ $+ [ $nick ] ] $true
var %blacklistedchannels = $ini(blacklist.ini,blacklist)
;;its possible to change the notice.The others shouldent be changed.
if ($2- == $null) && (%blacklist [ $+ [ $chan ] ]) {
notice $nick I have currently ( $+ %blacklistedchannels $+ ) channel(s) blacklisted. Retreiving info for channel: $chan $+ . Please wait........
.timer 1 2 notice $nick $chan is on the blacklist. If this isn't right please contact a moderator of #staffchan $+ .
halt
}
;;its possible to change the notice.The others shouldent be changed.
if ($2- == $null) && (!%blacklist [ $+ [ $chan ] ]) {
notice $nick I have currently ( $+ %blacklistedchannels $+ ) channel(s) blacklisted. Retreiving info for channel: $chan $+ . Please wait........
.timer 1 2 notice $nick $chan is not on the blacklist. If this isn't right please contact a moderator of #staffchan $+ .
halt
}
;;its possible to change the notice.The others shouldent be changed.
if (%blacklist [ $+ [ $2 ] ]) {
notice $nick I have currently ( $+ %blacklistedchannels $+ ) channel(s) blacklisted. Retreiving info for channel: $2- $+ . Please wait........
.timer 1 2 notice $nick $2- is on the blacklist. If this isn't right please contact a moderator of #staffchan $+ .
halt
}
;;its possible to change the notice.The others shouldent be changed.
if (!%blacklist [ $+ [ $2 ] ]) {
notice $nick I have currently ( $+ %blacklistedchannels $+ ) channel(s) blacklisted. Retreiving info for channel: $2- $+ . Please wait........
.timer 1 2 notice $nick $2- is not on the blacklist. If this isn't right please contact a moderator of #staffchan $+ .
halt
}
}
;;its possible to change the msg.The others shouldent be changed.
on me:*:JOIN:#: {
if ($chan == %blacklist) {
msg # Sorry but this channel is blacklisted. Parting in 3 seconds....... []2(If you think this isnt right please join #staffchannel)
timer 1 3 part # Blacklisted channel
halt
}
}
#blacklist end
Saga_99 Said:
if you record it as $ 2 - join when not recognized by the missing symbol is better to put
on me:*:JOIN:#: {
if ($nick == $me) {
if ($ chan isin% blacklist) {
msg # Sorry but this channel is blacklisted. Parting in 3 seconds....... []2(If you think this isnt right please join #staffchannel)
.timer 1 3 /part # Blacklisted channel
halt
}
}
}
lolwut???
Saga_99 you seem to make no sense...
also next time you post a bit of code... please use code tags. It just makes it easier to read.
code tags ex:
code goes here
if you record it as $ 2 - join when not recognized by the missing symbol is better to put
on me:*:JOIN:#: {
if ($nick == $me) {
if ($ chan isin% blacklist) {
msg # Sorry but this channel is blacklisted. Parting in 3 seconds....... []2(If you think this isnt right please join #staffchannel)
.timer 1 3 /part # Blacklisted channel
halt
}
}
}
^^
the 'me' prefix to which Jethro_ is referring is an undocumented feature which is used as he demonstrated (on me:levels:etc) and equivalent to checking if ($nick == $me) inside the event. the extra field is probably due to the fact that using 'me' in the level field should refer to a custom userlevel named 'me'.