egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Addban Script - mIRC to TCL

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
No_Miau
Voice


Joined: 27 Jul 2011
Posts: 2

PostPosted: Wed Jul 27, 2011 4:17 pm    Post subject: Addban Script - mIRC to TCL Reply with quote

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

Code:

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 Smile

Thank you a lot and sorry i speak only a bit english Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber