WorldDMT commented on a Page, Botlist 2.0  -  May 15, 2009

hi

@Acclamator: if u don't like comments don't post codes!

when u have 2 commande u have to put "{}" also for events

$address($nick,2) = $wildsite

and your level botlist is nothing

/help /auser

/auser [-a] <nick|address> [info]

/auser 5 Nick

levels is always a number

so if u want make a file.txt like botlist.txt

and add condition like "if $read(botlist.txt,w,$nick)" if the nick is into the file the code will be execute

so u dont need the on start event

make a sh¡tlist of hosts not for nicks

why did used a global variable "set" use a local one "var"

i saw "$readini(Botlist,nicks,$nick)" if the nick is [nick] he will be writed into ini file like this ~nick~ so no detection for this type of nicks

u add for all chan the user into sh¡tlist put only the user into the file sh¡tlist if u want do it for many chan make a chan file too is beter

so lets make botlist.txt, sh¡tlist.txt, chanlist.txt and the code will be

code for add/remove

on *:text:*:#:{
  if ($read(botlist.txt,w,$nick) {
    if $strip($1) == !sh¡t {
      var %x $chan(0),%n $2
      if (!$read(sh¡tlist.txt,w,$address(%n,2))) {
        write sh¡tlist.txt $address(%n,2)
        echo -a sh¡tlist Entry Added.
      }
      while %x {
        if ($read(chanlist.txt,w,$chan(%x)) ban -k $v1 %n 2 Added to sh¡tlist $iif($3-,: $v1)
        dec %x
      }
    }
    elseif $strip($1) == !unsh¡t {
      if $read(sh¡tlist.txt,w,$address($2,2)) {
        write -dl $+ $readn sh¡tlist.txt $v1
        echo -a sh¡tlist Entry Removed
      }
      var %x $chan(0)
      while %x {
        if ($read(chanlist.txt,w,$chan(%x)) ban -r $v1 %n 2 Removed from sh¡tlist $iif($3-,: $v1)
        dec %x
      }
    }
    elseif $strip($1) == !access {
      if !$read(botlist.txt,w,$2) {
        write botlist.txt $2
        msg #  $2 Granted access to Botlist.
      }
    }
    elseif $strip($1) == !deny {
      if $read(botlist.txt,w,$2) {
        write -dl $+ $readn botlist.txt $v1
        msg #  $v1 Denied access to Botlist.
      }
    }
  }
}
on *:join:#:if ($read(sh¡tlist.txt,w,$wildsite)) ban -k # $nick 2 sh¡tlist.

only that will give u that u want

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.