Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON @!*:JOIN:#: { .timer[BL_ $+ $nick $+ _CHECK] 1 3 bl_check $nick $chan $fulladdress }
- alias -l bl_check {
- var %f = akicks.ini
- var %t = $ini(%f,list,0)
- if ($0 !== 3) || ($me !ison $2) || ($me !isop $2) || ($1 !isreg $2) || (!$file(%f)) || (!%t) { return }
- var %i = 1
- while (%i <= %t) {
- var %s = $ini(%f,list,%i)
- var %v = $readini(%f,n,list,%s)
- var %h = $gettok(%v,1,32)
- var %r = $gettok(%v,2-,32)
- if (!%s) || (!%h) { goto next }
- if (%h !iswm * $+ $3 $+ *) { goto next }
- ban -k $2 $1 2 $iif(%r,$v1,Banned!)
- :next
- inc %i
- }
- }
- alias blacklistadd {
- if (!$1) { echo 4 -eat * /blacklistadd: Error, Insert a mask! | return }
- if (!$2) { echo 4 -eat * /blacklistadd: Error, Insert a reason! | return }
- var %f = akicks.ini
- var %id = $crc($1,0)
- var %r = $readini(%f,n,list,%id)
- if (%r) { echo 4 -eat * /blacklistadd: Error, $qt($1) Already exists! | return }
- writeini -n $qt(%f) list %id $1 $2-
- echo -eat * /blacklistadd: Added $qt($1) with reason $qt($2-)
- }
- alias blacklistdel {
- if (!$1) { echo 4 -eat * /blacklistdel: Error, Insert a mask! | return }
- var %f = akicks.ini
- var %t = $ini(%f,list,0)
- var %id = $crc($1,0)
- var %r = $readini(%f,n,list,%id)
- var %i = $gettok(%r,1,32)
- var %a = $gettok(%r,2-,32)
- if (!$file(%f)) { echo 4 -eat * /blacklistdel: Error, File is not exists or it is empty! | return }
- if (!%t) { echo 4 -eat * /blacklistdel: Error, The database is empty! | return }
- if (!%r) { echo 4 -eat * /blacklistdel: Error, $qt($1) Not exists! | return }
- remini $qt(%f) list %id
- echo -eat * /blacklistdel: Removed $qt(%i) with reason $qt(%a)
- }
- alias blacklist {
- var %f = akicks.ini
- var %t = $ini(%f,list,0)
- if (!$file(%f)) { echo 4 -eat * /blacklist: Error, File is not exists or it is empty! | return }
- if (!%t) { echo 4 -eat * /blacklist: Error, The database is empty! | return }
- echo -eat * /blacklist: Start of list...
- var %i = 1
- while (%i <= %t) {
- var %m = $ini(%f,list,%i)
- var %r = $readini(%f,n,list,%m)
- var %e = $gettok(%r,1,32)
- var %n = $gettok(%r,2-,32)
- if (%e) && (%n) { echo -a * $chr(35) $+ %i $+ : %e - %n }
- inc %i
- }
- echo -eat * /blacklist: End of list - (Total: %t $+ )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement