Ban-Infos

By rhasttaff on Aug 22, 2008

Image

Hello!!!
this is my Ban-Info This lock your ban and the infos around that ban.
if someone try to takeout that ban the remote will ban again and send the informations for the unbanner
no one can remove your ban before the pre-stabilished time.
(p.s The informations over the bans will be all unseted When you Quit/disconnect)

if (you want that dialog with that icons , Dll) and (a Readme.txt file explanation) {
/you can download here: http://rapidshare.com/files/139360223/Ban-Info.rar

}
else {

or you can copy the code below of the dialog (without that icons.)
and you will need have a Mdx.dll on your Mirc Directory to it looks good.

}

to load: PAste in Alt+R File/new

to use: sets a ban on someone and right mouse-click on channel-menu open Ban-Info or type /b-info

enjoy ;)

;#############################################################
;## Ban-InFos By rhasttaff ###################################
;###########################     WARNNN!! WARNNN!!        ####
;## if you Change The Name On This Code    ###################
;## This file can be self-destroyed in a few seconds :)~     #
;#############################################################
;## To Work type in the chan  /ban in someone or yourself &  #
;## Ask to someone takeout that Ban. and you can see the     #
;## infos of that ban on rightclick mouse on the chan menu   #
;## click Ban-Infos or /b-infos                              #
;#############################################################
menu channel {
  Ban-InFos:/b-infos
}
dialog baninfo {
  title "RasTa Ban-Infos"
  size -1 -1 196 105
  option dbu
  box "Banneds", 2, 2 1 149 102
  text "Ban:", 3, 5 21 12 8
  edit "", 4, 17 20 132 10, read center
  text "Sets on:", 5, 5 33 28 8
  edit "", 6, 34 32 54 10, read center
  edit "", 7, 89 32 60 10, read center
  text "On the Nick:", 8, 5 45 36 8
  edit "", 9, 44 44 105 10, read center
  text "Time of Ban:", 10, 5 56 37 8
  edit "", 11, 45 55 31 10, read center
  text "lefting:", 12, 78 56 26 8
  edit "", 13, 104 55 45 10, read center
  box "Kick reason", 14, 2 67 149 36
  edit "", 15, 5 73 144 29, read center multi
  box "Config", 16, 150 1 45 102
  combo 17, 152 16 42 72, size vsbar drop
  text "Default Time", 18, 155 8 37 7
  box "Status", 19, 150 36 45 32
  button "ON", 20, 175 44 18 9
  button "OFF", 21, 175 55 18 9
  button "OK", 24, 154 90 37 11, ok
  combo 25, 5 9 144 91, size vsbar drop
  button "Change", 26, 155 28 36 8
  edit "", 27, 152 17 41 10, read center
}
on *:dialog:baninfo:init:0: {
  /did -h $dname 17
  /did -a $dname 27 %b-i.tempo-padrao
  if (%b-i.banmaskaras != $null) {
    var %b-i.ban-masks = $numtok(%b-i.banmaskaras,32)
    while (%b-i.ban-masks > 0) {
      did -a baninfo 25 $gettok(%b-i.banmaskaras,%b-i.ban-masks,32) 
      dec %b-i.ban-masks
    }
  }
  var %b-i.bantimers = 1day 10hr  5hr 3hr 2hr 1hr 30min 20min  15min 10min 5min 3min 2min 1min
  var %b-i.ban-time = $numtok(%b-i.bantimers,32)
  while (%b-i.ban-time > 0) {
    did -a baninfo 17 $gettok(%b-i.bantimers,%b-i.ban-time,32) 
    dec %b-i.ban-time
  }

  if (!%b-i.status) { set %b-i.status off | did -e $dname 20 | did -b $dname 21   }
  if (%b-i.status == off) { set %b-i.status off | did -e $dname 20 | did -b $dname 21  }
  if (%b-i.status == on) { set %b-i.status on | did -e $dname 21 | did -b $dname 20   }
  /hide-colunas
}
on *:dialog:baninfo:sclick:20: {
  set %b-i.status on | did -e $dname 21 | did -b $dname 20 
}
on *:dialog:baninfo:sclick:21: {
  set %b-i.status off | did -e $dname 20 | did -b $dname 21
}
on *:dialog:baninfo:sclick:17: {
  set %b-i.tempo-padrao $did($dname,17).seltext
  /did -h $dname 17
  /did -v $dname 27
  /did -ra $dname 27 %b-i.tempo-padrao
  /did -e $dname 26
  /b-m-padra-temp
}
on *:dialog:baninfo:sclick:26: {
  did -h $dname 27
  did -v $dname 17
  did -b $dname 26
}
on *:dialog:baninfo:sclick:25: {
  //writeini baninfo.ini $did($dname,25).seltext restante $timer(_desbane-p. $+ $did($dname,25).seltext).secs $+ Secs
  /show-colunas
  did -ra baninfo 4 $readini(baninfo.ini,$did($dname,25).seltext,maskara)
  did -ra baninfo 6 $readini(baninfo.ini,$did($dname,25).seltext,hora)
  did -ra baninfo 7 $readini(baninfo.ini,$did($dname,25).seltext,data)
  did -ra baninfo 9 $readini(baninfo.ini,$did($dname,25).seltext,nick)
  did -ra baninfo 11 $readini(baninfo.ini,$did($dname,25).seltext,tempoban)
  did -ra baninfo 13 $readini(baninfo.ini,$did($dname,25).seltext,restante)
  did -ra baninfo 15 $readini(baninfo.ini,$did($dname,25).seltext,kick)
}
alias bm-mdx { return $shortfn(Mdx.dll) }
dialog auto-unban {
  title "Ban Recent"
  size -1 -1 198 36
  option dbu
  text "Ban", 1, 2 2 11 8, center
  edit "", 2, 17 1 177 10, read center
  box "Ban Time", 3, 2 11 192 22
  radio "Default", 4, 5 19 32 10
  radio "Personalized", 5, 50 19 48 10
  combo 6, 99 18 26 41, size drop autovs
  box "", 7, 46 11 85 22
  box "", 8, 162 11 32 22
  button "Cancel", 9, 134 18 25 12, ok
  button "Ok", 10, 166 18 25 12, ok
}
on *:dialog:auto-unban:init:*: {
  dll $bm-mdx SetMircVersion $version 
  dll $bm-mdx MarkDialog $dname
  dll $bm-mdx SetDialog $dname style title staticedge
  var %b-i.bantimers = 1day 10hr  5hr 3hr 2hr 1hr 30min 20min  15min 10min 5min 3min 2min 1min
  var %b-i.ban-time = $numtok(%b-i.bantimers,32)
  while (%b-i.ban-time > 0) {
    did -a auto-unban 6 $gettok(%b-i.bantimers,%b-i.ban-time,32) 
    dec %b-i.ban-time
  }
  did -a auto-unban 2 %b-i.recent-ban
  if (!%b-i.ban-tipo) { /set %b-i.ban-tipo Padrao | did -m auto-unban 4 | did -b auto-unban 6 | did -u auto-unban 5 }
  if (%b-i.ban-tipo != Padrao) { /set %b-i.ban-tipo Padrao | did -c auto-unban 4 | did -b auto-unban 6 | did -u auto-unban 5 }
  if (%b-i.ban-tipo == Padrao) { /set %b-i.ban-tipo Padrao | did -c auto-unban 4 | did -b auto-unban 6 | did -u auto-unban 5 }
}
on *:dialog:auto-unban:sclick:4: {
  /set %b-i.ban-tipo Padrao
  did -b auto-unban 6
}
on *:dialog:auto-unban:sclick:5: {
  /set %b-i.ban-tipo Personalizado
  did -e auto-unban 6
  did -u auto-unban 4
}
on *:dialog:auto-unban:sclick:6: {
  set %b-i.perso-temp $did($dname,6).seltext
  /b-m-perso-temp
}
on *:dialog:auto-unban:sclick:9: {
  var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,%b-i.recent-ban,32)
  set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
  var %b-i.nicks-rem $findtok(%b-i.bannicks,%b-i.recent-ban-nick,32)
  set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
  /remini baninfo.ini %b-i.recent-ban
  /unset %b-i.recent-ban %b-i.recent-ban-nick
  /dialog -x auto-unban
}
on *:load: {
  set %b-i.padra-temp 60
  set %b-i.status on
  set %b-i.tempo-padrao 1min
  set %b-i.ban-tipo Padrao
}
on *:unload: {
  unset %b-i. $+ *
  if ($exists(baninfo.ini)) { /remove baninfo.ini }
}
on *:dialog:auto-unban:sclick:10: {
  set %b-i.calc-time1 $calc(%b-i.padra-temp + 2)
  set %b-i.calc-time2  $calc(%b-i.persona-temp + 2)
  if (%b-i.ban-tipo == Padrao) {  .timer_desbane-p. $+ %b-i.recent-ban  1 %b-i.padra-temp /mode $readini(baninfo.ini,%b-i.recent-ban,canal) -b %b-i.recent-ban | //writeini baninfo.ini %b-i.recent-ban tempoban %b-i.tempo-padrao | .timer_b-m-unseta1 1 $calc(%b-i.padra-temp + 1) /b-m-val-unset %b-i.recent-ban }
  if (%b-i.ban-tipo == Personalizado) {  .timer_desbane-p. $+ %b-i.recent-ban 1 %b-i.persona-temp /mode $readini(baninfo.ini,%b-i.recent-ban,canal) -b %b-i.recent-ban | //writeini baninfo.ini %b-i.recent-ban tempoban %b-i.perso-temp | .timer_b-m-unseta2 1 $calc(%b-i.persona-temp + 1) /b-m-val-unset %b-i.recent-ban } 
}
on 1:BAN:#: {
  if (%b-i.status == on) {
    if ($nick == $me) && ($banmask != %b-i.rebanido) { 
      var %b-i.nicks-chan = 1
      while ($ialchan($banmask,#,%b-i.nicks-chan).nick != $null) {
        /set %b-i.recent-ban-nick $v1
        inc %b-i.nicks-chan
      }
      /set %b-i.recent-ban $banmask
      //writeini baninfo.ini $banmask maskara $banmask
      //writeini baninfo.ini $banmask nick $iif(%b-i.recent-ban-nick,%b-i.recent-ban-nick,$banmask $+ No/Nick)
      //writeini baninfo.ini $banmask data $date
      //writeini baninfo.ini $banmask hora $time
      //writeini baninfo.ini $banmask canal $chan
      //writeini baninfo.ini $banmask kick -=[ This user was not kicked ]=-
      set %b-i.banmaskaras  $addtok(%b-i.banmaskaras,$banmask,32)
      set %b-i.bannicks  $addtok(%b-i.bannicks,%b-i.recent-ban-nick,32)
      /dialog -m auto-unban auto-unban
    }
  }
}
on *:kick:#: {
  if ($nick == $me) && ($knick == %b-i.recent-ban-nick) { /writeini baninfo.ini %b-i.recent-ban kick Reason: $1- }
}
on *:UNBAN:#: {
  if (%b-i.status == on) {
    if ($nick !== $me) && ($istok(%b-i.banmaskaras,$banmask,32)) && (%b-i.removed-times < 5) {
      //writeini baninfo.ini $banmask restante $timer(_desbane-p. $+ $banmask).secs $+ Secs
      /set %b-i.rebanido $banmask 
      /mode $chan +b $banmask 
      /avisa-do-desban $nick $chan $readini(baninfo.ini,$banmask,data) $readini(baninfo.ini,$banmask,hora) $readini(baninfo.ini,$banmask,nick) $readini(baninfo.ini,$banmask,tempoban) $readini(baninfo.ini,$banmask,restante) $readini(baninfo.ini,$banmask,kick)
      .timer_rebaniu. $+ $banmask 1 15 /unset %b-i.rebanido  
      if (!%b-i.removed-times) {
        set %b-i.removed-times 1
      }
      else {
        inc %b-i.removed-times
      }
      halt
    }
    if ($nick !== $me) && ($istok(%b-i.banmaskaras,$banmask,32)) && (%b-i.removed-times = 5) {
      /mode $chan +b $banmask 
      inc %b-i.removed-times
      /msg $chan okok! i'll Try to do you Stop it!
      /mode $chan -oh $nick $nick

      halt
    }
    if ($nick !== $me) && ($istok(%b-i.banmaskaras,$banmask,32)) && (%b-i.removed-times >= 6) {
      /msg $chan okok you winn! i'll do you Stop it! 
      if ($banmask isban $chan) { /mode $chan -b $banmask }
      var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,$banmask,32)
      set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
      var %b-i.nicks-rem $findtok(%b-i.bannicks,$readini(baninfo.ini,$banmask,nick),32)
      set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
      /remini baninfo.ini $banmask
      /unset %b-i.recent-ban %b-i.recent-ban-nick %b-i.rebanido
      halt
    }
    if ($nick == $me) && ($istok(%b-i.banmaskaras,$banmask,32))  {
      var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,$banmask,32)
      set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
      var %b-i.nicks-rem $findtok(%b-i.bannicks,$readini(baninfo.ini,$banmask,nick),32)
      set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
      /remini baninfo.ini $banmask
      /unset %b-i.recent-ban %b-i.recent-ban-nick %b-i.rebanido
      halt
    }
  }
}
alias hide-colunas {
  did -h baninfo 3-15
}
alias show-colunas {
  did -v baninfo 3-15
}
alias b-infos {
  dialog -m baninfo baninfo
}
alias b-m-val-unset {
  var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,%b-i.recent-ban,32)
  set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
  var %b-i.nicks-rem $findtok(%b-i.bannicks,%b-i.recent-ban-nick,32)
  set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
  if ($exists(baninfo.ini)) { .remini baninfo.ini $1 }
}

;## New!!!
;## Thanks to Zmodem
alias b-m-perso-temp {
  var %v = %b-i.perso-temp, %t = $iif(min isin %v,min,$iif(hr isin %v,hr,day)), %r = $remove(%v,%t), %s = set $chr(37) $+ b-i.persona-temp
  if (%t == min) %s $calc(%r * 60)
  if (%t == hr) %s $calc(%r * 3600)
  if (%t == day) %s $calc(24 * %r * 3600)
}
alias b-m-padra-temp {
  var %v = %b-i.tempo-padrao, %t = $iif(min isin %v,min,$iif(hr isin %v,hr,day)), %r = $remove(%v,%t), %s = set $chr(37) $+ b-i.padra-temp
  if (%t == min) %s $calc(%r * 60)
  if (%t == hr) %s $calc(%r * 3600)
  if (%t == day) %s $calc(24 * %r * 3600)
}
;############################
alias avisa-do-desban {
  /notice $1  4[7Ant9-7Unban4]  $1 This is one of my Bans. and will be removed by me in a pre-stabilished time.
  /notice $1  4[7Ant9-7Unban4]  $1 to purpose this Ban was set's on:   $3  <->  $4  On the Nick:  $5  for  $6  lefting:  $7  kick-reason:  $8-  
}
alias b-m-unset-saindo {
  unset %b-i.banmaskaras %b-i.bannicks
  if ($exists(baninfo.ini)) { /remove baninfo.ini }
}
on *:disconnect:/b-m-unset-saindo
on 1:quit: {
  if ($nick = $me) { /b-m-unset-saindo  }
}
;############### The enD :)~ #####################

Comments

Sign in to comment.
rhasttaff   -  Aug 23, 2008

lol Zmodem you like some work :)
Thanks its looks good.
but its can confuse me with this done snippet
and so i will learn this to the next snippet!

Thanks again!

 Respond  
Zmodem   -  Aug 23, 2008

If I may, I think I can help some more (if you don't mind!). It's just fun to help other people :)

;#############################################################
;## Ban-InFos By rhasttaff ###################################
;###########################     WARNNN!! WARNNN!!        ####
;## if you Change The Name On This Code    ###################
;## This file can be self-destroyed in a few seconds :)~     #
;#############################################################
;## To Work type in the chan  /ban in someone or yourself &  #
;## Ask to someone takeout that Ban. and you can see the     #
;## infos of that ban on rightclick mouse on the chan menu   #
;## click Ban-Infos or /b-infos                              #
;#############################################################
menu channel {
  Ban-InFos:b-infos
}
dialog baninfo {
  title "RasTa Ban-Infos"
  size -1 -1 196 105
  option dbu
  box "Banneds", 2, 2 1 149 102
  text "Ban:", 3, 5 21 12 8
  edit "", 4, 17 20 132 10, read center
  text "Sets on:", 5, 5 33 28 8
  edit "", 6, 34 32 54 10, read center
  edit "", 7, 89 32 60 10, read center
  text "On the Nick:", 8, 5 45 36 8
  edit "", 9, 44 44 105 10, read center
  text "Time of Ban:", 10, 5 56 37 8
  edit "", 11, 45 55 31 10, read center
  text "lefting:", 12, 78 56 26 8
  edit "", 13, 104 55 45 10, read center
  box "Kick reason", 14, 2 67 149 36
  edit "", 15, 5 73 144 29, read center multi
  box "Config", 16, 150 1 45 102
  combo 17, 152 16 42 72, size vsbar drop
  text "Default Time", 18, 155 8 37 7
  box "Status", 19, 150 36 45 32
  button "ON", 20, 175 44 18 9
  button "OFF", 21, 175 55 18 9
  button "OK", 24, 154 90 37 11, ok
  combo 25, 5 9 144 91, size vsbar drop
  button "Change", 26, 155 28 36 8
  edit "", 27, 152 17 41 10, read center
}
ON *:DIALOG:baninfo:*:*: {
  var %d = $dname, %e = $devent, %i = $did, %a = did -a %d, %n = did -e %d, %b = did -b %d, %r = did -ra baninfo, %sel, %ini = baninfo.ini
  if (%e == init) {
    did -h %d 17
    %a 27 %b-i.tempo-padrao
    if (%b-i.banmaskaras != $null) {
      var %b-i.ban-masks = $numtok(%b-i.banmaskaras,32)
      while (%b-i.ban-masks > 0) {
        %a 25 $gettok(%b-i.banmaskaras,%b-i.ban-masks,32) 
        dec %b-i.ban-masks
      }
    }
    var %b-i.bantimers = 1day 10hr  5hr 3hr 2hr 1hr 30min 20min  15min 10min 5min 3min 2min 1min
    var %b-i.ban-time = $numtok(%b-i.bantimers,32)
    while (%b-i.ban-time > 0) {
      %a 17 $gettok(%b-i.bantimers,%b-i.ban-time,32) 
      dec %b-i.ban-time
    }

    if (!%b-i.status) { set %b-i.status off | %n 20 | %b 21   }
    if (%b-i.status == off) { set %b-i.status off | %n 20 | %b 21  }
    if (%b-i.status == on) { set %b-i.status on | %n 21 | %b 20   }
    hide-colunas
  }
  if (%e == sclick) {
    if (%i == 17) {
      set %b-i.tempo-padrao $did($dname,17).seltext
      did -h %d 17
      did -v %d 27
      %r 27 %b-i.tempo-padrao
      %n 26
      b-m-padra-temp
    }
    if (%i == 20) { set %b-i.status on | %n 21 | %b 20 }
    if (%i == 21) { set %b-i.status off | %n20 | %b 21 }
    if (%i == 25) {
      %sel = $did(25).seltext
      writeini %ini %sel restante $timer(_desbane-p. $+ %sel).secs $+ Secs
      show-colunas
      %r 4 $readini(%ini,%sel,maskara)
      %r 6 $readini(%ini,%sel,hora)
      %r 7 $readini(%ini,%sel,data)
      %r 9 $readini(%ini,%sel,nick)
      %r 11 $readini(%ini,%sel,tempoban)
      %r 13 $readini(%ini,%sel,restante)
      %r 15 $readini(%ini,%sel,kick)
    }
    if (%i == 26) { did -h %d 27 | did -v %d 17 | %b 26 }
  }

}
alias bm-mdx { return $shortfn(Mdx.dll) }
dialog auto-unban {
  title "Ban Recent"
  size -1 -1 198 36
  option dbu
  text "Ban", 1, 2 2 11 8, center
  edit "", 2, 17 1 177 10, read center
  box "Ban Time", 3, 2 11 192 22
  radio "Default", 4, 5 19 32 10
  radio "Personalized", 5, 50 19 48 10
  combo 6, 99 18 26 41, size drop autovs
  box "", 7, 46 11 85 22
  box "", 8, 162 11 32 22
  button "Cancel", 9, 134 18 25 12, ok
  button "Ok", 10, 166 18 25 12, ok
}
ON *:DIALOG:auto-unban:*:*: {
  var %d = $dname, %e = $devent, %i = $did, %l = dll $bm-mdx, %c = did -c auto-unban, %b = did -b auto-unban, %u = did -u auto-unban
  if (%e == init) {
    %l SetMircVersion $version 
    %l MarkDialog $dname
    %l SetDialog $dname style title staticedge
    var %b-i.bantimers = 1day 10hr  5hr 3hr 2hr 1hr 30min 20min  15min 10min 5min 3min 2min 1min
    var %b-i.ban-time = $numtok(%b-i.bantimers,32)
    while (%b-i.ban-time > 0) {
      did -a %d 6 $gettok(%b-i.bantimers,%b-i.ban-time,32) 
      dec %b-i.ban-time
    }
    did -a %d 2 %b-i.recent-ban
    if (!%b-i.ban-tipo) { set %b-i.ban-tipo Padrao | did -m %d 4 | %b 6 | %u 5 }
    if (%b-i.ban-tipo != Padrao) { set %b-i.ban-tipo Padrao | %c 4 | %b 6 | %u 5 }
    if (%b-i.ban-tipo == Padrao) { set %b-i.ban-tipo Padrao | %c 4 | %b 6 | %u 5 }
  }
  if (%e == sclick) {
    if (%i == 4) { set %b-i.ban-tipo Padrao | %b 6 }
    if (%i == 5) { set %b-i.ban-tipo Personalizado | did -e %d 6 | %u 4 }
    if (%i == 6) { set %b-i.perso-temp $did(6).seltext | b-m-perso-temp }
    if (%i == 9) {
      var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,%b-i.recent-ban,32)
      set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
      var %b-i.nicks-rem $findtok(%b-i.bannicks,%b-i.recent-ban-nick,32)
      set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
      remini baninfo.ini %b-i.recent-ban
      unset %b-i.recent-ban %b-i.recent-ban-nick
      dialog -x %d
    }
    if (%i == 10) {
      set %b-i.calc-time1 $calc(%b-i.padra-temp + 2)
      set %b-i.calc-time2  $calc(%b-i.persona-temp + 2)
      if (%b-i.ban-tipo == Padrao) {  .timer_desbane-p. $+ %b-i.recent-ban  1 %b-i.padra-temp mode $readini(baninfo.ini,%b-i.recent-ban,canal) -b %b-i.recent-ban | writeini baninfo.ini %b-i.recent-ban tempoban %b-i.tempo-padrao | .timer_b-m-unseta1 1 $calc(%b-i.padra-temp + 1) b-m-val-unset %b-i.recent-ban }
      if (%b-i.ban-tipo == Personalizado) {  .timer_desbane-p. $+ %b-i.recent-ban 1 %b-i.persona-temp mode $readini(baninfo.ini,%b-i.recent-ban,canal) -b %b-i.recent-ban | writeini baninfo.ini %b-i.recent-ban tempoban %b-i.perso-temp | .timer_b-m-unseta2 1 $calc(%b-i.persona-temp + 1) b-m-val-unset %b-i.recent-ban } 
    }
  }
}

on *:load: {
  set %b-i.padra-temp 60
  set %b-i.status on
  set %b-i.tempo-padrao 1min
  set %b-i.ban-tipo Padrao
}
on *:unload: { 
  unset %b-i. $+ *
  if ($exists(baninfo.ini)) { remove baninfo.ini }
}
on 1:BAN:#: {
  var %w = writeini baninfo.ini $banmask
  if (%b-i.status == on) {
    if ($nick == $me) && ($banmask != %b-i.rebanido) { 
      var %b-i.nicks-chan = 1
      while ($ialchan($banmask,#,%b-i.nicks-chan).nick != $null) {
        set %b-i.recent-ban-nick $v1
        inc %b-i.nicks-chan
      }
      set %b-i.recent-ban $banmask
      %w maskara $banmask
      %w nick $iif(%b-i.recent-ban-nick,%b-i.recent-ban-nick,$banmask $+ No/Nick)
      %w data $date
      %w hora $time
      %w canal $chan
      %w kick -=[ This user was not kicked ]=-
      set %b-i.banmaskaras  $addtok(%b-i.banmaskaras,$banmask,32)
      set %b-i.bannicks  $addtok(%b-i.bannicks,%b-i.recent-ban-nick,32)
      dialog -m auto-unban auto-unban
    }
  }
}
on *:kick:#:if (($nick == $me) && ($knick == %b-i.recent-ban-nick)) { writeini baninfo.ini %b-i.recent-ban kick Reason: $1- }
on *:UNBAN:#: {
  if (%b-i.status == on) {
    var %c = $chan, %n = $nick, %b = $banmask
    if (%n !== $me) && ($istok(%b-i.banmaskaras,%b,32)) && (%b-i.removed-times < 5) {
      writeini baninfo.ini %b restante $timer(_desbane-p. $+ %b).secs $+ Secs
      set %b-i.rebanido %b 
      mode %c +b %b
      avisa-do-desban %n %c $readini(baninfo.ini,%b,data) $readini(baninfo.ini,%b,hora) $readini(baninfo.ini,%b,nick) $readini(baninfo.ini,%b,tempoban) $readini(baninfo.ini,%b,restante) $readini(baninfo.ini,%b,kick)
      .timer_rebaniu. $+ %b 1 15 unset %b-i.rebanido  
      if (!%b-i.removed-times) { set %b-i.removed-times 1 }
      else { inc %b-i.removed-times }
      halt
    }
    if (%n !== $me) && ($istok(%b-i.banmaskaras,%b,32)) && (%b-i.removed-times = 5) {
      mode %c +b %b
      inc %b-i.removed-times
      msg %c okok! i'll Try to do you Stop it!
      mode %c -oh %n %n
      halt
    }
    if (%n !== $me) && ($istok(%b-i.banmaskaras,%b,32)) && (%b-i.removed-times >= 6) {
      msg %b okok you winn! i'll do you Stop it! 
      if (%b isban %c) { mode %c -b %b }
      var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,%b,32)
      set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
      var %b-i.nicks-rem $findtok(%b-i.bannicks,$readini(baninfo.ini,%b,nick),32)
      set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
      remini baninfo.ini %b
      unset %b-i.recent-ban %b-i.recent-ban-nick %b-i.rebanido
      halt
    }
    if (%n == $me) && ($istok(%b-i.banmaskaras,%b,32))  {
      var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,%b,32)
      set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
      var %b-i.nicks-rem $findtok(%b-i.bannicks,$readini(baninfo.ini,%b,nick),32)
      set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
      remini baninfo.ini %b
      unset %b-i.recent-ban %b-i.recent-ban-nick %b-i.rebanido
      halt
    }
  }
}
alias hide-colunas { did -h baninfo 3-15 }
alias show-colunas { did -v baninfo 3-15 }
alias b-infos { dialog -m baninfo baninfo }
alias b-m-val-unset {
  var %b-i.maskaras-rem $findtok(%b-i.banmaskaras,%b-i.recent-ban,32)
  set %b-i.banmaskaras $deltok(%b-i.banmaskaras,%b-i.maskaras-rem,32)
  var %b-i.nicks-rem $findtok(%b-i.bannicks,%b-i.recent-ban-nick,32)
  set %b-i.bannicks $deltok(%b-i.bannicks,%b-i.nicks-rem,32)
  if ($exists(baninfo.ini)) { .remini baninfo.ini $1 }
}

;## New!!!
;## Thanks to Zmodem
alias b-m-perso-temp {
  var %v = %b-i.perso-temp, %t = $iif(min isin %v,min,$iif(hr isin %v,hr,day)), %r = $remove(%v,%t), %s = set $chr(37) $+ b-i.persona-temp
  if (%t == min) %s $calc(%r * 60)
  if (%t == hr) %s $calc(%r * 3600)
  if (%t == day) %s $calc(24 * %r * 3600)
}
alias b-m-padra-temp {
  var %v = %b-i.tempo-padrao, %t = $iif(min isin %v,min,$iif(hr isin %v,hr,day)), %r = $remove(%v,%t), %s = set $chr(37) $+ b-i.padra-temp
  if (%t == min) %s $calc(%r * 60)
  if (%t == hr) %s $calc(%r * 3600)
  if (%t == day) %s $calc(24 * %r * 3600)
}
;############################
alias avisa-do-desban {
  var %1 = $1
  notice %1  4[7Ant9-7Unban4]  %1 This is one of my Bans. and will be removed by me in a pre-stabilished time.
  notice %1  4[7Ant9-7Unban4]  %1 to purpose this Ban was set's on:   $3  <->  $4  On the Nick:  $5  for  $6  lefting:  $7  kick-reason:  $8-  
}
alias b-m-unset-saindo {
  unset %b-i.banmaskaras %b-i.bannicks
  if ($exists(baninfo.ini)) { remove baninfo.ini }
}
on *:disconnect:b-m-unset-saindo
on 1:quit:if ($nick = $me) { /b-m-unset-saindo  }
;############### The enD :)~ #####################

A few re-writes here and there. You are going to want to test this out before you erase your own stuff (ALWAYS!). I just re-wrote a few things, so I'm not sure if I broke anything, but I think everything is in good standing.

Most of the work done here is just optimization and code consistency changes (ie: removing repetitiveness). All of your dialog events (ON::) are now rolled up into one checker event, in order to reduce file size and confusion. The parsing is much quicker when it doesn't need to look through all of the ON dialog calls for sclick 30 times. Just make one large event and evaluate the event being called and it's respective id.

BARE IN MIND: This is merely something to view/evaluate. You are under no obligation to change ANYTHING you've got. In fact, taking just suggestions and re-working things yourself, if you see so fit to change a thing, is the best way to get better :) I hope you understand that these are only suggestions :)

Enjoy!

 Respond  
Zmodem   -  Aug 23, 2008

Hey, no problem! Glad that I could be of some assistance :) Thanks for the reps in the snippet! :)

 Respond  
rhasttaff   -  Aug 23, 2008

Hey!!
Zmodem good observation and Nice solution :)
Thanks very very by the help ;)

 Respond  
Zmodem   -  Aug 23, 2008

Hey, looks great! If I may, here's a more optimized version of your 'b-m-perso-temp' alias:

 alias b-m-perso-temp {
  var %v = %b-i.perso-temp, %t = $iif(min isin %v,min,$iif(hr isin %v,hr,day)), %r = $remove(%v,%t), %s = set $chr(37) $+ b-i.persona-temp
  if (%t == min) %s $calc(%r * 60)
  if (%t == hr) %s $calc(%r * 3600)
  if (%t == day) %s $calc(24 * %r * 3600)
} 

Also, I would just like to point out that in your example, you've shown that the '3hr' is: 14400. However, that would be the 4th hour that results in 14400. Hour 3 is 3600*3, or: 10800.

I would also like to let you know that you can use an endless amount of min/hr/day now, as the result will calculate to any liking. Enjoy!

 Respond  
SweeTCooL   -  Aug 23, 2008

and also in this snippet its not like that pic i cant see the kick reason and the ban time and set on i only Can see the On/off and the banndes and change with Default time that what i can see :s and when i ban some 1 the ban recent window open but with no IP that i ban :s and ty :D

 Respond  
SweeTCooL   -  Aug 23, 2008

hey Again :D i also try it now still i delete it and download it still with the same problem i think try it from this snippet not from the Web i try it from here it work there is no that msg but the problem is when i ban my IP or any IP and If any 1 Try to Remove it nth happen like how u say i dont know what is going on with me lol maybe its problem from my Script :s but i dont think so :/ i test it more and more to see what happen and thxx :D

 Respond  
rhasttaff   -  Aug 23, 2008

heya Thanks Eugenio. for test an Rate this :)

and i believe that SweeTCool have downloadded the fulladdon on the link.
But i Believe that he have to put the Addon Path on the Mirc General directory
i wait for him next comment.

and the error that you sayd, i cant find this line.
please if you find this:

  • /if: invalid format (line 2, Ban Protection) <<< thats the only error I got

paste here ok :)

Thanks again!

 Respond  
Eugenio   -  Aug 23, 2008

works fine for me =/

  • /if: invalid format (line 2, Ban Protection) <<< thats the only error I got
    /me rates 8
 Respond  
Eugenio   -  Aug 23, 2008

I will test for you mate
/me tests

 Respond  
rhasttaff   -  Aug 23, 2008

uhh sorry by this SweeTCooL
now i'm confused becouse i've tested this much times before post, and works fine w/ me

the icons is the more simple thing in this addon
they are relationed with the clicks [ON] [OFF]
and the init dialog event.
and looking by this there is NO errors on the code

i like to wait to someone more test it and post here.

so if you (Someone that is reading this post) have tested This code please post here if its works with you!

ahh and take right that the path (Ban-Info) is into general Mirc Dir

Thanks again!

 Respond  
SweeTCooL   -  Aug 23, 2008

hey rhasttaff its ok and Yvw :D
i didnt rename it or any thing and i delete it and download it again but still the same problem and i see the .ico names if its same what u type all is same i didnt change it
and still that problem :

  • /dialog: 'baninfo' error loading icon 'ban-info/desligado.ico' (line 255, Ban-Info.mrc)
    :((( lol
 Respond  
rhasttaff   -  Aug 22, 2008

heya!! Valew aew Dan :)

 Respond  
_Daniel_   -  Aug 22, 2008

Legals Parabens :D

 Respond  
rhasttaff   -  Aug 22, 2008

sorry by this SweeTCooL
the only way that it can comes is:
if ((the icon Desligado.ico isnot on the path Ban-Info) and||or (The icon is there but not with that name.)) { /please dont rename filenames }
Take right that is there the fileName's and Pathname
path Ban-info
icon 1: Fogo.ico
icon2: Desligado.ico
icon3: Ligado.ico
icon4: Bandeira-rasta.jpg
file: Ban-info.mrc
file2: Mdx.Dll
file3: ReadMe.txt

ahh does not confuse things this show you only Yourself Bans not The Channel Bans,
you have to set a ban to get the infos around it.

but i have updated the link now, but a did only Spell corrections (i hope :x)

SweeTCooL please download again
and thanks for test my code :)

Jah Bless´´´

 Respond  
Cheiron   -  Aug 22, 2008

there you go rhasttaff.. you need to de bug that line..

  • /dialog: 'baninfo' error loading icon 'ban-info/desligado.ico' (line 279, Ban-Info.mrc)

it has an error

 Respond  
SweeTCooL   -  Aug 22, 2008

hey cheiron and rhasttaf the problem is i Got that:

  • /dialog: 'baninfo' error loading icon 'ban-info/desligado.ico' (line 279, Ban-Info.mrc)
    cz i download it from http://rapidshare.com/files/139192977/Ban-Info.rar
    and i try it from this snippet But it open, when i ban someone and someone unban it nth happen :/ also didnt show me the banns like how he show us the Pic i try every thing but didnt work O.o
 Respond  
rhasttaff   -  Aug 22, 2008

Tree Times lol Cheiron
i use the brother google translate :)

and thanks very much to understand my bad english :) and too to rates my code!

thanks again!

Jah Bless´´´

 Respond  
Cheiron   -  Aug 22, 2008

"my long comment in portugese for you curtesy of babel fish"

olha muito interessante firstly. edição ligeira com a pequena notícia que está na língua dobro embora. não faz as coisas que desobstruído. poderia você o espaço livre de que acima para por favor como uma actualização possível. quanto para às proibições próprias. um proprietário do quarto poderá remover as proibições como poderia uma CONCESSÃO dependendo de seu próprio nível dentro do quarto. um simples começ é ao redor o ajuste da modalidade +e no quarto em um entalhe. isso contorneará todas as proibições ajustadas nesse entalhe. pôde valer a pena verific para ver se a modalidade +e é ajustada no quarto evitar isto que acontece. igualmente você pode ser de-statused neste caso a proibição é levantada simplesmente. tão outra vez pôde valer a pena actualizar esta pequena notícia para incluir uma proteção do status em o senhor mesmo forneceu-o tem altamente bastante níveis do chanserv ou de acesso.

hopefully will know what i meant now. it looks as though have addressed the points though there so thank you :)

gets a rating of 6 and a like / começ uma avaliação de 6 e da como

 Respond  
rhasttaff   -  Aug 22, 2008

Thanks all to comment my post!!

heya!! Cheiron long long comment lol.
how my english is very bad, if a culd understand half part of your comment,

is hard to me think in Portuguese and write in english, and the mirc language is english language.
so i believe if you have interress into the mechanism of that code you can understand it.
becouse the mirc events and mirc identfyers is english language.
and i did this addon some time before to register here,
and now i'm translating the interface Language of My Codes to Post here
like this one wher the addon interface is completly understandable in english.

and yeahs there is so many ways to the ban "Lock" dont work.

  • if the banned nick is a Sop or is in +e list
    becouse the +e mode or he can be unbanned by /cs

  • if the unbanner is a op
  • if the unbanner is a Protect
  • if the unbanner Owner
    they can deop or kick you.

But the finality of this addon is just show the informations
around that ban if the unbanner alread dontknow this
becouse if the user was banned there is a reason
and the others ops on your chan have to respect your decision around that ban.

so if the people go clear the ban box he will be know that
thats ban will be auto unbanned and the reason for this.

and why you will ban a Sop protect or owner?!
the finality is just the infos.

Thanks to Comment my post Cheiron
if you have tested this Code Thanks again!

and Thanks to Scakk
for comment and the help
its work!
i will do this!
.
if there is some error please post here with the line number :)

Jah Bless´´´

 Respond  
Cheiron   -  Aug 22, 2008

you able to post the error messages at all SweeTCooL so we can have a look at the code at what lines not working please :)

 Respond  
SweeTCooL   -  Aug 22, 2008

it look good but didnt work with me :/

 Respond  
Scakk   -  Aug 22, 2008

The aliases hide-colunas and show-colunas can be shorted to the below.

alias hide-colunas { did -h baninfo 3-15 }
alias show-colunas { did -v baninfo 3-15 }
 Respond  
Cheiron   -  Aug 22, 2008

looks very interesting firstly.. slight issue with the snippet being in double language though. does not make things that clear. could you clear that up for please as a possible update.
as for the bans itself.. a room owner will be able to remove the bans as could a SOP depending on your own level within the room. a simple get around is the setting of mode +e on the room on a nick. that will bypass any bans set on that nick. it might be worth checking to see if mode +e is set in the room to avoid this happening.. also you can be de-statused in which case the ban is simply lifted. so again it might be worth updating this snippet to include a status protection on yourself provided you have high enough chanserv or access levels.

will await a test before i actually comment further. this is purely an observational comment atm :)

 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.