No_Miau Voice
Joined: 27 Jul 2011 Posts: 2
|
Posted: Wed Jul 27, 2011 4:17 pm Post subject: Addban Script - mIRC to TCL |
|
|
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
Thank you a lot and sorry i speak only a bit english  |
|