This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Addban Script - mIRC to TCL

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
N
No_Miau
Voice
Posts: 2
Joined: Wed Jul 27, 2011 4:03 pm

Addban Script - mIRC to TCL

Post by No_Miau »

Hi! This is the script on mIRC and i would like get it on TCL:

Code: Select all

ON *:JOIN:#Channel: {
  var %filelistban = addban.txt
  var %Tenl = 1
  while %Tenl <= $lines(%filelistban) {
    var %MascB = $gettok($read -l $+ %Tenl %filelistban,1,32)
    if %MascB iswm $address($nick,5) {
      set %BaNCompM $remtok($read(%filelistban,$readn),%MascB,1,32)
      mode $chan -Q+b %MascB
      mode $chan -Q | kick $chan $nick Banned: %BaNCompM
      goto fin
    }
    inc %Tenl
  }
  :fin
}

ON *:TEXT:*:#Channel: {
if ( $1 == !addban ) && ( $2 != $null ) {
        var %filelistban = addban.txt
        .write -iL1 %filelistban $2- | .notice $nick Dirección $2 añadida a la lista de bans :) | savereg En $chan $nick el $date a las $time $1-
      }
if ( $1 == !remban ) && ( $2 != $null ) {
        var %filelistban = addban.txt
        .write -ds $2 %filelistban | .notice $nick Dirección $2 eliminada de la lista de bans :) | savereg En $chan $nick el $date a las $time $1-
      }
}
When anybody join on #Channel the Bot read if his mask (like *!*@whatever) is on addban.txt. If this is so, Bot ban him with reason.
With !addban mask reason, the Bot add a line on addban.txt and with !remban mask, the bot remove that line :)

Thank you a lot and sorry i speak only a bit english :wink:
Post Reply