So, I was thinking earlier today, I haven't written a proper mIRC script in a while.. So I decided to restart using my mIRC bot to which I will code again from scratch.
I have since written a BlackList script using .ini files.
Triggers:
!BLAdd Nick <Kick Message (Optional)>
!BLDel Nick
I will eventually be updating it more so you can check the list via PM, And that if the user is not on the channel OR Network, You are able to remove it manually via the host which is saved in the file.
(NOTE:) Just in case people don't know, I use both the nick Peer and GrimReaper while I am on GeekShed.. I tend to vary which one I use every now and again.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Black List script by Peer ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start Setup ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Replace the ! for a character of your choice!
alias -l BLChar { return ! }
; This is the Default Kick Message, Please change it to your desired message.
alias -l BLDefKM { return You have been added to my BlackList.. Good bye. }
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; End Setup ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:TEXT:*:#: {
if ($nick isop $chan) {
if ($1 == $+($BLChar,BLAdd)) {
if (!$2) { msg $chan Error: Please enter a NickName to add to the BlackList. }
elseif ($ini(BlackList.ini,$+($network,.,$chan),$BLADR($2))) { msg $chan Error: The NickName provided has already been added to the BlackList. }
else {
writeini $iif($ini(BlackList.ini,$+($network,$chan),$BLADR($2)),-n) BlackList.ini $+($network,.,$chan) $BLADR($2) $iif($3,$3-,$BLDefKM)
$iif($2 ison $chan,mode $chan +b $address($2,2))
$iif($2 ison $chan,kick $chan $2 $readini(BlackList.ini,$+($network,.,$chan),$BLADR($2)))
msg $chan The User $+(,$2,) has been added to my BlackList with the host $+ $BLADR($2) $+ .
}
}
elseif ($1 == $+($BLChar,BLDel)) {
if (!$2) { msg $chan Error: Please enter a NickName to remove from the BlackList. }
elseif (!$ini(BlackList.ini,$+($network,.,$chan),$BLADR($2))) { msg $chan Error: The NickName provided is not present in the BlackList. }
else {
remini BlackList.ini $+($network,.,$chan) $BLADR($2)
mode $chan -b $address($2,2)
msg $chan The User $+(,$2,) has been removed from my BlackList with the host $+ $BLADR($2) $+ .
}
}
}
}
on @*:JOIN:#: {
if ($ini(BlackList.ini,$+($network,.,$chan),$BLADR($nick))) {
mode $chan +b $address($nick,2)
kick $chan $nick $readini(BlackList.ini,$+($network,.,$chan),$BLADR($nick))
}
}
alias -l BLADR { return $remove($address($1,2),$chr(33),$chr(42)) }
Hey @H0LLYWOOD, I will work on the script now. :) It's not that much of an edit.
Thanks bud, It's been a while since I coded in mIRC from scratch, Usually I just modify other people's codes or fix other codes for people. So I thought I better get back into it.