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-
}
}
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