I need a little help from everyone ..
With this code under, example if I do in my channel #egitim !addto 1.1.1.1 or !addto 1.1.* And then bot automatically makes the IP in this file blacklist.txt
Code: Select all
on *:TEXT:!addto *:#egitim:{
if ($nick ison #) && ($2 = $read(blacklist.txt,w,$2)) && ($2) { msg #egitim 47I can't add this IP 4IP: $+ $2 $+ 47because is in the List! | halt }
if ($nick ison #) && ($2 != $read(blacklist.txt,s,$2)) && ($2) { write blacklist.txt $2 | msg #egitim 4IP: $+ $2 $+ 47I have add in List! | kline *@ $+ $2 5m | halt }
}
Code: Select all
on *:TEXT:!delto *:#egitim:{
if ($nick ison #) && ($2 != $read(blacklist.txt,s,$2)) && ($2) { //filter -ffcx blacklist.txt blacklist.txt $2 | msg #egitim 4IP: $+ $2 $+ 47I have deleted from the List! | kline -*@ $+ $2 | halt }
}
}
Code: Select all
ON *:TEXT:*trueip*:#egitim: {
var %f = allow.txt
if (!$file(%f)) { msg $chan ( $+ $nick $+ ): Error, file $qt(%f) does NOT exists or it is empty! | return }
if ($window(@temp)) { window -c $v1 }
window -hj1000000000 @temp
loadbuf @temp $qt(%f)
var %t = $line(@temp,0)
var %i = 1
while (%i <= %t) {
var %w = $strip($line(@temp,%i))
if (!%w) { goto next }
if (%w iswm $2) || (%w == $2) { var %tot = $addtok(%tot,%w,32) }
:next
inc %i
}
window -c @temp
if (%tot) { msg $chan ( $+ $nick $+ ): $numtok(%tot,32) Matches: %tot }
else { msg $chan ( $+ $nick $+ ): No results founded! | /msg #egitim !add $2 }
}
AdmiraL