mIRC Home    About    Download    Register    News    Help

Print Thread
#203341 12/08/08 02:14 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
on 1000:text:kb*:?: { 
  if ($2 == $null) { .msg $nick Command incomplete. Syntax: /msg $me kb <#channel> <nick> [reason]. | halt }
  if ($me !isop $2) { .msg $nick I'm not oped in $2 $+ . | closemsg $nick | halt } 
  if ($me !ison $2) { .msg $nick I'm not on that channel. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 == $null)) { .msg $nick You didn't specified the nickname to kick | closemsg $nick | halt }
  if ($3 == $nick) { .msg $nick I will not kick ban you. | closemsg $nick | halt }
  if ($3 == $me) { .msg $nick I will not kick ban myself. | closemsg $nick | halt }
  if ($3 !ison $2) { .msg $nick $3 is not on $2 $+ . | closemsg $nick | halt }
  if (($2 !== $null) && ($3 !== $null) && ($level($mask($address($3,2),2)) == 1000)) { .msg $nick I will not kick ban my owner. | halt }
  if (($2 !== $null) && ($3 !== $null) && ($4 == $null)) { //mode $2 +b $mask($address($3,2),2)) | kick $2 $3 banned.. | closemsg $nick | halt }
  if (($2 !== $null) && ($3 !== $null) && ($4 !== $null)) { //mode $2 +b $mask($address($3,2),2)) | kick $2 $3 $4- | closemsg $nick | halt }
}

if a user has 1000 level i want bot dnt ban kick that user confused

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try replacing all occurrences of $mask($address($3,2),2) with $address($3,2). Also I suggest you use if/elseif statements and get rid of the halts. Additionally you may wish to put the closemsg $nick command at the end of the if/elseif's so that it is executed no matter what, and still only needs to be specified once.

Joined: Sep 2007
Posts: 109
K
Vogon poet
Offline
Vogon poet
K
Joined: Sep 2007
Posts: 109
my english is bad, I hope to have interpreted well
/guser 1000 nick
Code:
on *:text:*:?: {
  if $level($address($nick,5)) != 1000 { .msg $nick You do not have access }
  else {
    if $strip($1) = kb {
      if !$2 || !$3 { .msg $nick Command incomplete. Syntax: kb <#channel> <nick> [reason] }
      elseif $me !ison $2 { .msg $nick I'm not on that channel. }
      elseif $me !isop $2 { .msg $nick I'm not oped in $+($2,.) } 
      elseif $me == $3 { .msg $nick I will not kick ban myself. } 
      elseif $nick == $3 { .msg $nick I will not kick ban you. }
      elseif $3 !ison $2 { .msg $nick $3 is not on $+($2,.) }
      else { ban -k $2 $3 2 $4- $iif(!$4-,banned...) }
    }
  }
  close.msg $nick
}




Link Copied to Clipboard