Channel blacklist for mIRC bot

Moderator: GeekShed.Net Staff

Channel blacklist for mIRC bot

Postby GrimReaper » Mon Jun 21, 2010 7:45 pm

Code: Select all
on *:TEXT:!BL*:#: {
  if ($nick == YOURNICKNAME) {
    if (!$2) { msg $chan * Error: Incorrect syntax used: !BL <Add/Del> <channelname> }
    elseif ($2 == Add) {
      if (!$3) { msg $chan * Error: Incorrect syntax used: !BL Add <channelname> }
      elseif ($istok(%blacklist. [ $+ [ $network ] ],$3,44)) {
        msg $chan * Error: This channel $+(,",$3,",) is already on my Channel Blacklist.
      }
      else {
        set %blacklist. [ $+ [ $network ] ] $addtok(%blacklist. [ $+ [ $network ] ],$3,44)
        msg $chan $3 has been added to my channel blacklist for $network $+ .
      }
    }
    elseif ($2 == Del) {
      if (!$3) { msg $chan * Error: Incorrect syntax used: !BL Del <channelname> }
      elseif (!$istok(%blacklist. [ $+ [ $network ] ],$3,44)) {
        msg $chan * Error: This channel $+(,",$3,",) is not currently on my Channel Blacklist.
      }
      else {
        set %blacklist. [ $+ [ $network ] ] $remtok(%blacklist. [ $+ [ $network ] ],$3,44)
        msg $chan $3 has been removed from my channel blacklist for $network $+ .
        $iif(%blacklist. [ $+ [ $network ] ] == $null,unset %blacklist. [ $+ [ $network ] ])
      }
    }
    elseif ($2 == List) {
      msg $chan $iif(%blacklist. [ $+ [ $network ] ] == $null,No channels are on my blacklist for $network $+ .,Current blacklist for $network $+ : %blacklist. [ $+ [ $network ] ])
    }
  }
}

on *:JOIN:#: {
  if ($istok(%blacklist. [ $+ [ $network ] ],$chan,44)) {
    part $chan Channel is blacklisted.
  }
}


I decided to make a channel blacklist as I was bored. You have to change YOURNICKNAME to your nick, or change the entire second line to:
Code: Select all
if ($address($nick,2) == YOURHOSTHERE) {


Lemme know what you think. \o/
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Channel blacklist for mIRC bot

Postby GrimReaper » Sat Aug 14, 2010 5:13 pm

The previous blacklist script in here is for Variables, This current one was made by me and Zetacon. It uses .ini's so it's more easy to sort out as it create's a file.

Code: Select all
alias loc return $iif($chan,$v1,$nick)

on @*:text:!blacklist *:*:{
  tokenize 32 $strip($1-)
  if ($2 == view) && ($ini(blacklist.ini,$chan,0)) {
    .msg $loc 4Displaying A List Of Blacklisted Nicks/Hosts For $loc $+ :
    var %a 1, %z $ini(blacklist.ini,$chan,0)
    while (%a <= %z) {
      msg $loc %a Nick: $ini(blacklist.ini,$chan,%a) Reason: $readini(blacklist.ini,$chan,$ini(blacklist.ini,$chan,%a))
      inc %a
    }
    .msg $chan End of list. %z entry(s) displayed.
  }
  elseif ($2 == view) && (!$ini(blacklist.ini,$chan,0)) {
    msg $loc Sorry $nick $+ , there is no-one on the blacklist for $chan $+ .
  }

  if ($2 == add) {
    if ($3) {
      writeini blacklist.ini $chan $3 $iif(!$4,Blacklisted from $chan $+ .,$4-)
      msg $chan " $+ $3 $+ " Added as a blacklisted nick by $nick $+ , With reason: $iif(!$4,Blacklisted from $chan $+ .,$4-) $+ 
    }
  }
  if ($2 == del) {
    if ($3) {
      if ($readini(blacklist.ini,$chan,$3)) {
        remini blacklist.ini $chan $3
        msg $chan Removed $3 from the blacklist.
      }
    }
    else {
      msg $chan 4No such blacklist entry.
      notice $nick To see the list of blacklisted Nick/Host Entries, type !blacklist
    }
  }
}

on *:JOIN:#: {
  if ($readini(blacklist.ini,$chan,$nick)) {
    mode $chan +b $address($nick,2)
    kick $chan $nick $readini(blacklist.ini,$chan,$nick)
  }
}


I hope you all like it.. If you want to talk to any thing I have made or want any advice, Don't be affraid to pop into #hell or #Zetacon, That is where I am mainly.

Many thank's and please comment on the script. :)
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Channel blacklist for mIRC bot

Postby Smithy » Mon Aug 16, 2010 11:26 pm

I really wish you wouldn't rip my scripts. Especially when I asked you for your help on this blacklist script. I can tell it's mind because of the custom identifier "$loc". I'd like it removed, please. :)
Smithy

Life is short, break the rules, forgive sooner, love with true love, laugh without control and always keep smiling.

Image
User avatar
Smithy
 
Posts: 5
Joined: Sun Aug 08, 2010 5:57 pm
Location: Plymouth


Return to Script help

Who is online

Users browsing this forum: No registered users and 9 guests

cron