mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on *:BAN:#: {
  if ($nick == $me) { halt }
  if ($banmask == *!*@*) { halt }
  set %banmask $banmask
  set %ban.chan $chan
  if (%ban_pro_shit == on) && ($banmask iswm $address($me,5)) && ($me isop $chan)  { 
    if ($me !isop $chan) { halt }
    if ($me isop $chan) {
      mode $chan -ob $nick $banmask
      if ($me isop $chan) kick $chan $nick %banpro.kick
      halt
    }
  }
  if (%kickonban == Enabled) {
    if ($read($mircdir\dontbkick.txt,w,* $+ $chan $+ *)) { return }
    if $ial(%banmask,0).nick == 0 { halt }
    if ($banmask iswm $address($me,5)) { halt }
    set %totalbuser $ial(%banmask,0).nick
    set %startban 1
    :loop
      if ($me isop $chan) kick $chan $ial(%banmask,%startban).nick $eval(%enforcbkick, 2) $+ ) %kick.txt
      if %startban == %totalbuser { halt }
      else inc %startban 1 | goto loop 
    }

  }
}

that work on a ban.. "enforcing and also unban if im banned", the problem i have, thats if the banned nick isop in the channel the ban get set, then i dont want that user kicked.. if i use:

$ial(%banmask,%startban).nick

then i will get the nick instead of the banmask.

if ($ial(%banmask,%startban).nick isop $chan) { do stuff }

dosent work any other idea? :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try this modification
Code:
 on @!*:BAN:#: {
  if ($banmask != *!*@*) {
    set %banmask $banmask
    set %ban.chan $chan
    if $ial(%banmask,%startban).nick !isop %ban.chan && (%ban_pro_shit == on) && ($banmask iswm $address($me,5)) { 
      mode $chan -ob $nick $banmask
      kick $chan $nick %banpro.kick
    }
  }
  if (%kickonban == Enabled) && !$read(dontbkick.txt,w,$+(*,$chan,*)) && ($ial(%banmask,0).nick || ($banmask !iswm $address($me,5))) {
    var %totalbuser = $ial(%banmask,0).nick, %startban = 1
    while %startban <= %totalbuser {
      if ($me isop $chan) kick $chan $ial(%banmask,%startban).nick $eval(%enforcbkick, 2) $+ ) %kick.txt
      inc %startban
    }
  }
}
 

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Nope, still kick on ban even due the nick that gets banned is oped.. :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
There's only a slight problem I could see real quick is that you don't have a rule set for Operators example I see tons of if ($me isop $chan) however you don't have a rule set for if ($nick isop $chan) which is important so your script can say hey i better follow this rule and halt somewhere when a certain thing happens. What has been edited in original script is in RED

I could Re-code this script so it is smaller for what you want to do however it might/might not be confusing so i've only edited your script

Quote:
Code:
on *:BAN:#: {
  if ($nick == $me) { halt }
  if ($banmask == *!*@*) { halt }
  set %banmask $banmask
  set %ban.chan $chan
  if (%ban_pro_shit == on) && ($banmask iswm $address($me,5)) && ($me isop $chan)  { 
    if ($me !isop $chan) { halt }
    if ($me isop $chan) {
      mode $chan -ob $nick $banmask
    [color:red] if ($nick isop $chan) { halt alone or plus do stuff with proper break }
      else[/color]if ($me isop $chan) kick $chan $nick %banpro.kick
      halt
    }
  }
  if (%kickonban == Enabled) {
    if ($read($mircdir\dontbkick.txt,w,* $+ $chan $+ *)) { return }
    if $ial(%banmask,0).nick == 0 { halt }
    if ($banmask iswm $address($me,5)) { halt }
    set %totalbuser $ial(%banmask,0).nick
    set %startban 1
    :loop
    if ($me isop $chan) kick $chan $ial(%banmask,%startban).nick $eval(%enforcbkick, 2) $+ ) %kick.txt
      if %startban == %totalbuser { halt }
      else inc %startban 1 | goto loop 
    }

  }
}

that work on a ban.. "enforcing and also unban if im banned", the problem i have, thats if the banned nick isop in the channel the ban get set, then i dont want that user kicked.. if i use:

$ial(%banmask,%startban).nick

then i will get the nick instead of the banmask.

if ($ial(%banmask,%startban).nick isop $chan) { do stuff }

dosent work any other idea? :tongue:


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard