on *:text:*:#:{
  if $chan = #Kontrol && $nick = Chanserv && * tarafindan silindi. iswm $1- {
    var %n $strip($2), %k $strip($4), %s $strip($7)
    if %k = #Dj {
      hdel -m $b(RenkDj) %n
      hsave $b(RenkDj) $bs(RenkDj)
    }
    if $istok($trglobal,%k,32)  {
      write $bt(Accdel) $date $time $qt3(%k) kanalından $qt3(%s) tarafindan silindi -> $qt3(%n)  
    }
  }
  if $chan = #Spam {
    var %e $replacecs($1-,[PRIVMSG],~,->,$chr(32)), %e $gettok(%e,2-,126), %yazan $gettok(%e,1,32), %yazilan $gettok(%e,2,32), %metin $gettok(%e,4-,32)
    write $spmtext(q,%yazan,%yazilan) %metin
    write $spmtext(a,%yazilan,%yazan) %metin
  }
  if $chan = #Kontrol && $nick = NickServ {
    if *IP adresiyle sunucuya login oldu.* iswm $1- {
      var %ip $gettok($4,2,$asc(@)), %n $strip($2)
      if !$hget($b(nickipdb),%ip) { hadd -m $b(nickipdb) %ip $date $time(HH:nn) -> %n  }
      else hadd -m $b(nickipdb) %ip $date $time(HH:nn) -> %n * $gettok($hget($b(nickipdb),%ip),1-20,42)
      hsave $b(nickipdb) $bs(nickipdb)
    }
    if *ridentify kullandi.* iswm $1- {
      var %n $strip($4), %ip $remove($gettok($5,2,$asc(@)),$chr(41))
      if !$hget($b(nickipdb),%ip) { hadd -m $b(nickipdb) %ip $date $time(HH:nn) -> %n  }
      else hadd -m $b(nickipdb) %ip $date $time(HH:nn) -> %n * $gettok($hget($b(nickipdb),%ip),1-20,42)
      hsave $b(nickipdb) $bs(nickipdb)
    }
  }
  if $regex($1,/^[.!-][iİı]p/Si) && $istok(#K-Admin #chanserv-yönetim #Nickserv-yönetim #Sales-Yönetim #Güvenlik #Admin #Xline,$chan,32) {
    var %Nick $nick
    if $hget(IrC,baStarD) = ok { msg $chan $qt3($nick) 14Saldiri süphesi ortadan kalkana kadar $qt3($1-) 14komutunu uygulayamazsiniz. Kullanıma acilmasina $qt3($dr($duration($hget(irc,bastard).unset))) 14kaldı. | return }

    if !$hget($b(duzey),%nick) {
      sockwrite -n $b.sock.c($chan) privmsg $chan $qt3($nick) 14Kendinize lütfen seviye ekletin!
    }
    elseif !$istok(10 9,$hget($b(duzey),%nick),32) && $hget($b(duzey),$3) {
      sockwrite -n $b.sock.c($chan) privmsg $chan $qt3($nick) 14Oper admin bilgisine bakabilmek icin gerekli seviyede değilsiniz. (Kullanımı $qt3(9 10) $+ )
    }
    elseif $2 = $chr(42) && $nick = IrCbaStarD {
      sockwrite -n $b.sock.c($chan) privmsg $chan IP db: $hget($b(takip),0).item ~ $bytes($file($bs(takip)).size,k) Kb
      sockwrite -n $b.sock.c($chan) privmsg $chan Nick db: $hget($b(takip.n),0).item ~ $bytes($file($bs(takip.n)).size,k) Kb
      sockwrite -n $b.sock.c($chan) privmsg $chan Nick Değişim db: $hget($b(takip-2),0).item ~ $bytes($file($bs(takip-2)).size,k) Kb
    }
    elseif $2 = - && $istok($masternick,%nick,32)  { 
      if $hget($b(takip),$3) { sockwrite -n $b.sock.c($chan) privmsg $chan $qt3($3) 14Nolu ip bilgileri silindi. | hdel $b(takip) $3 | hsave $b(takip) $bs(takip) }
      else sockwrite -n $b.sock.c($chan) privmsg $chan $qt3($3) 14IP bilgileri bulanamadi.
    }
    elseif !$2 { sockwrite -n $b.sock.c($chan) privmsg $chan Lütfen ip yada nick belirtin. }
    elseif $regex($2,/\d+\.\d+\.|\./i) { 
      if $hget($b(buffer.ip)) { hfree $v1 }
      srjn.ip $2
      hadd -m bilgi nick %nick 
      hadd -m $b(buffer.ip) e $2  
      sockwrite -n admin stats g 
      sockwrite -n admin stats s
      $+(.timer,$2,$chan) 1 10 ip.bilgileri $2 $chan $nick $b.sock.c($chan)
      write $bt(iplog) $qt1($date $time) $qt1(Kanal: $chan) $qt2(Nick: $nick) 4-> $qt5(IP: $2)
    } 
    elseif $2 = nick {
      nick.bilgileri $3 $chan $b.sock.c($chan)
    }
  }
}
alias b.sock.c return $replace($1,#chanserv-yönetim,Chanserv,#Nickserv-yönetim,Nickserv,#Sales-Yönetim,Salebot,#Admin,NoMercy,#Güvenlik,Admin,#K-Admin,NoMercy,#Xline,NoMercy)
alias nick.bilgileri {
  if $hget($b(takip.n),14 $+ $strip($1) $+ 12) {
    var %x $numtok($hget($b(takip.n),14 $+ $strip($1) $+ 12),$asc(~))
    if %x = 1 {
      var %ips $gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),1,32)
      sockwrite -n $3 privmsg $2 $qt3($1) nickine ait rapor!
      sockwrite -n $3 privmsg $2 $qt3($str(¯,50))  
      sockwrite -n $3 privmsg $2 $qt3($ne.zaman($gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),3,32)) - $gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),2,32)) $qt1(IP: $gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),1,32))  $qt1(Uygulama: $gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),4,32)) 
      sockwrite -n $3 privmsg $2 $chr(160)
      if $hget($b(takip-2),%ips) {
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $qt3($1) Nick değişim raporu
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $replace($hget($b(takip-2),%ips),~,$chr(44))
        sockwrite -n $3 privmsg $2 $chr(160)
      }
      sockwrite -n $3 privmsg $2 IP Hakkında daha genis bilgi almak istiyorsanız $qt1(!ip %ips) yapmalisin.
      sockwrite -n $3 privmsg $2 $chr(160)
    }
    else {
      sockwrite -n $3 privmsg $2 $qt3($1) nickine ait rapor!
      sockwrite -n $3 privmsg $2 $qt3($str(¯,50))  
      var %s 1, %q sockwrite -n $3 privmsg $2 
      while %s <= %x {
        var %ips $gettok($gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),%s,$asc(~)),1,32)
        %q %s $+ ) $qt5($ne.zaman($gettok($gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),%s,$asc(~)),3,32)) - $gettok($gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),%s,$asc(~)),2,32)) $qt4(Uygulama: $gettok($gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),%s,$asc(~)),4,32)) $qt1(IP: $gettok($gettok($hget($b(takip.n),14 $+ $strip($1) $+ 12),%s,$asc(~)),1,32))
        inc %s
      }
      if $hget($b(takip-2),%ips) {
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $qt3(Nick değişim raporu)
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $qt1(%ips) $replace($hget($b(takip-2),%ips),~,$chr(44))
      }
      sockwrite -n $3 privmsg $2 $chr(160)
      sockwrite -n $3 privmsg $2 IP Hakkında daha genis bilgi almak istiyorsanız $qt1(!ip %ips) yapmalisin.
    }
  }
  if $hget($b(takip.n),$strip($1)) {
    var %x $numtok($hget($b(takip.n),$1),$asc(~))
    if %x = 1 {
      var %ips $gettok($hget($b(takip.n),$1),1,32)
      sockwrite -n $3 privmsg $2 $qt3($1) nickine ait rapor!
      sockwrite -n $3 privmsg $2 $qt3($str(¯,50))  
      sockwrite -n $3 privmsg $2 $str($chr(160),2) ~ $qt3(Zaman) ~ $str($chr(160),7) ~ $qt3(Uyglama) ~ $str($chr(160),6) ~ $qt3(IP) ~
      sockwrite -n $3 privmsg $2 $chr(160)
      sockwrite -n $3 privmsg $2 $qt3($ne.zaman($gettok($hget($b(takip.n),$1),3,32)) - $gettok($hget($b(takip.n),$1),2,32)) $str($chr(160),10) $qt3($strip($gettok($hget($b(takip.n),$1),4,32))) $str($chr(160),10) $qt3($gettok($hget($b(takip.n),$1),1,32))  
      sockwrite -n $3 privmsg $2 $chr(160)
      if $hget($b(takip-2),%ips) {
        sockwrite -n $3 privmsg $2 $qt3(%ips) 14Nolu IP adresine ait nick değişim raporu 
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $replace($strip($replace($hget($b(takip-2),%ips),~,$str($chr(160),2))),->,$qt3(->))
        sockwrite -n $3 privmsg $2 $chr(160)
      }
      sockwrite -n $3 privmsg $2 14IP Hakkında daha genis bilgi almak istiyorsanız $qt3(!Ip %ips) 14yapmalisin.
      sockwrite -n $3 privmsg $2 $chr(160)
    }
    else {
      sockwrite -n $3 privmsg $2 $qt3($1) 14nickine ait rapor!
      sockwrite -n $3 privmsg $2 $qt3($str(¯,50))  
      sockwrite -n $3 privmsg $2 $str($chr(160),12) ~ $qt3(Zaman) ~ $str($chr(160),7) ~ $qt3(Uyglama) ~ $str($chr(160),6) ~ $qt3(IP) ~
      sockwrite -n $3 privmsg $2 $chr(160)
      var %s 1, %q sockwrite -n $3 privmsg $2 
      while %s <= %x {
        var %ips $gettok($gettok($hget($b(takip.n),$1),%s,$asc(~)),1,32)
        %q $qt.3($iif($len(%s) = 1,0 $+ %s,%s))  $chr(160) $qt3($ne.zaman($gettok($gettok($hget($b(takip.n),$1),%s,$asc(~)),3,32)) - $gettok($gettok($hget($b(takip.n),$1),%s,$asc(~)),2,32)) $str($chr(160),11) $qt3($strip($gettok($gettok($hget($b(takip.n),$1),%s,$asc(~)),4,32))) $str($chr(160),10) $qt3($gettok($gettok($hget($b(takip.n),$1),%s,$asc(~)),1,32))
        inc %s
      }
      if $hget($b(takip-2),%ips) {
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $qt3(%ips) 14Nolu IP adresine ait nick değişim raporu 
        sockwrite -n $3 privmsg $2 $chr(160)
        sockwrite -n $3 privmsg $2 $replace($strip($replace($hget($b(takip-2),%ips),~,$str($chr(160),2))),->,$qt3(->))
      }
      sockwrite -n $3 privmsg $2 $chr(160)
      sockwrite -n $3 privmsg $2 14IP Hakkında daha genis bilgi almak istiyorsanız $qt3(!Ip %ips) 14yapmalisin.
      sockwrite -n $3 privmsg $2 $chr(160)
    }
  }
  if !$hget($b(takip.n),$strip($1)) && !$hget($b(takip.n),14 $+ $strip($1) $+ 12) { 
    sockwrite -n $3 privmsg $2 IP/Nick takip listesinde bilgi bulunamadi. 
  }
  sockwrite -n $3 privmsg $2 $qt3($str(¯,50))  
}
alias ip.bilgileri {
  if $hget($b(takip),$1) {
    var %x $numtok($hget($b(takip),$1),$asc(~))
    if %x = 1 {
      sockwrite -n $4 privmsg $2 $qt3($1) IP Raporu!
      sockwrite -n $4 privmsg $2 $qt3($str(¯,50))  
      sockwrite -n $4 privmsg $2 $str($chr(160),2)  ~ $qt3(Zaman) ~ $str($chr(160),7) ~ $qt3(Uyglama) ~ $str($chr(160),3) ~ $qt3(Nick) ~
      sockwrite -n $4 privmsg $2 $chr(160)
      sockwrite -n $4 privmsg $2 14( $+ $qt3($ne.zaman($gettok($hget($b(takip),$1),3,32)) - $gettok($hget($b(takip),$1),2,32)) $+ 14) $str($chr(160),12) $qt3($strip($gettok($hget($b(takip),$1),4,32)))  $str($chr(160),15)  $qt3($remove($gettok($hget($b(takip),$1),1,32),~)) 
      sockwrite -n $4 privmsg $2 $chr(160)
      if $hget($b(takip-2),$1) {
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $qt3($1) 14Nick Değişim Raporu
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $replace($strip($hget($b(takip-2),$1)),~,$chr(44),->,$qt3(->))
        sockwrite -n $4 privmsg $2 $chr(160)
      }
      if $hget($b(nickipdb),$1) {
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $qt3($1) 14Nick Identify Raporu
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $gettok($replace($hget($b(nickipdb),$1),~,$chr(44) $chr(32)),1-8,44)
        sockwrite -n $4 privmsg $2 $chr(160)
      }
      sockwrite -n $4 privmsg $2 $qt3($3) -> $qt8($1) -> Nolu ip hakkında toplam $qt.3(%x) adet veri bulundu.
      if $hget($1,Nerden) {
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 14Nerden  -> $qt3($1) -> Ülke $qt3($salesulke($hget($1,nerden))) Sehir $qt3($hget($1,sehir)) Servis sağlayici -> $qt3($hget($1,iss))
      }     
      sockwrite -n $4 privmsg $2 $chr(160)
      sockwrite -n $4 privmsg $2 $hget($1,ban)
      hadd -mu2 nickserv.s s evet 
      sockwrite -n admin ns list $+(*@,$1)
    }
    else {
      sockwrite -n $4 privmsg $2 $qt3($1) IP Raporu!
      sockwrite -n $4 privmsg $2 $qt3($str(¯,50))  
      sockwrite -n $4 privmsg $2 $str($chr(160),13) ~ $qt3(Zaman) ~ $str($chr(160),7) ~ $qt3(Uyglama) ~ $str($chr(160),4) ~ $qt3(Nick) ~
      sockwrite -n $4 privmsg $2 $chr(160)
      var %s 1, %q sockwrite -n $4 privmsg $2 
      while %s <= %x {
        %q $qt.3($iif($len(%s) = 1,0 $+ %s,%s)) $chr(160) 14( $+ $qt3($ne.zaman($gettok($gettok($hget($b(takip),$1),%s,$asc(~)),3,32)) - $gettok($gettok($hget($b(takip),$1),%s,$asc(~)),2,32)) $+ 14) $str($chr(160),9) $qt3($strip($gettok($gettok($hget($b(takip),$1),%s,$asc(~)),4,32))) $str($chr(160),10) $qt3($strip($gettok($gettok($hget($b(takip),$1),%s,$asc(~)),1,32)))  
        inc %s
      }
      if $hget($b(takip-2),$1) {
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $qt3($1) 14Nick Değişim Raporu
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $replace($gettok($replace($strip($hget($b(takip-2),$1)),~,$chr(44),->,$qt3(->)),1-8,44),$chr(44),$qt3([*'*]))
        sockwrite -n $4 privmsg $2 $chr(160)
      }
      if $hget($b(nickipdb),$1) {
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $qt3($1) 14Nick Identify Raporu
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 $replace($gettok($hget($b(nickipdb),$1),1-8,42),->,$qt3(->),*,$qt3([***]))
        sockwrite -n $4 privmsg $2 $chr(160)
      }
      sockwrite -n $4 privmsg $2 $chr(160)
      sockwrite -n $4 privmsg $2 $qt3($3) $1 Nolu ip hakkında toplam $qt.3(%x) adet veri bulundu.
      if $hget($1,Nerden) {
        sockwrite -n $4 privmsg $2 $chr(160)
        sockwrite -n $4 privmsg $2 14Nerden  -> $qt3($1) -> Ülke $qt3($salesulke($hget($1,nerden))) Sehir $qt3($hget($1,sehir)) Servis sağlayici -> $qt3($hget($1,iss))
      }     
      sockwrite -n $4 privmsg $2 $chr(160)
      sockwrite -n $4 privmsg $2 $hget($1,ban)
      hadd -mu2 nickserv.s s evet 
      sockwrite -n admin ns list $+(*@,$1)
    }
  }
  else {
    sockwrite -n $4 privmsg $2 $qt3(IP/Nick) takip listesinde bilgi bulunamadi.
    sockwrite -n $4 privmsg $2 $chr(160)
    sockwrite -n $4 privmsg $2 $hget($1,ban)
    if $hget($1,Nerden) {
      sockwrite -n $4 privmsg $2 $chr(160)
      sockwrite -n $4 privmsg $2 14Nerden  -> $qt3($1) -> Ülke $qt3($salesulke($hget($1,nerden))) Sehir $qt3($hget($1,sehir)) Servis sağlayici -> $qt3($hget($1,iss))
    }     
    hadd -mu2 nickserv.s s evet | sockwrite -n admin ns list $+(*@,$1)
  }
  sockwrite -n $4 privmsg $2 $qt3($str(¯,50))  
  .timer 1 1 hfree -sw $1
}
alias srjn.ip { var %r $r(1000,99999) | sockopen $+(ipbul,%r) igs.gevezeyiz.net 80 | sockmark $+(ipbul,%r) $+($1,¿,$2) }
alias xhtmlfree { if ($len($1-) <= 900) { var %x, %i = $regsub($1,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ,$chr(9)) | return %x } } 
on *:sockopen:ipbul*:{  
  sockwrite -nt $sockname GET $+(/bilgi.php?ip=,$token($sock($sockname).mark,1,191)) HTTP/1.1
  sockwrite -nt $sockname Host: $sock($sockname).addr
  sockwrite -nt $sockname Connection: keep-alive
  sockwrite -nt $sockname Cache-Control: max-age=0
  sockwrite -nt $sockname Upgrade-Insecure-Requests: 1
  sockwrite -nt $sockname User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
  sockwrite -nt $sockname Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
  sockwrite -nt $sockname Accept-Language: tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7
  sockwrite -nt $sockname $crlf
} 
on *:sockread:ipbul*:{
  var &b | sockread &b | var %k $bvar(&b,1,$bvar(&b,0)).text, %k $replace(%k,<br/>,*,LiteSpeed,~), %k $remove(%k,$lf,$cr,$crlf), %k $turk2($gettok(%k,2,126))
  if $regex(c,%k,/<span>Country Code[:]<\/span>\s<span>(.+)<\/span>\*<span>City[:]<\/span>\s<span>(.+)<\/span>\*.+<span>ISP[:]<\/span>\s<span>(.+)<\/span>.+/i) {
    hadd -m $token($sock($sockname).mark,1,191) Nerden $regml(c,1)
    hadd -m $token($sock($sockname).mark,1,191) Sehir $gettok($regml(c,2),1,$asc(<))
    hadd -m $token($sock($sockname).mark,1,191) iss $gettok($regml(c,3),1,$asc(<))
    sockclose $sockname
  }
}

alias ddzz return $replace($1-,|,_,/,_,[,_,],_,$chr(123),_,$chr(125),_)
alias spmtext {
  if ($1 = q) {
    if $hget($b(db),$2) {
      return $+(IrCbaStarD\text\Gsicil\register\Query\,$ddzz($2),.txt) ( $+ $date $time $+ ) $2 $qt3(<->) $3 [<-MSJ->]
    }
    else return $+(IrCbaStarD\text\Gsicil\kayitsiz\Query\,$ddzz($2),.txt) ( $+ $date $time $+ ) $2 $qt3(<->) $3 [<-MSJ->]
  }
  if ($1 = a) {
    if $hget($b(db),$2) { 
      return $+(IrCbaStarD\text\Gsicil\register\QueryX\,$ddzz($2),.txt) ( $+ $date $time $+ ) $3 $qt3(<->) $2 [<-MSJ->]
    }
    else return $+(IrCbaStarD\text\Gsicil\kayitsiz\QueryX\,$ddzz($2),.txt) ( $+ $date $time $+ ) $3 $qt3(<->) $2 [<-MSJ->]
  }
}

on *:rawmode:#: {
  if ($chan == #NickServ) && ($1 == +v) && ($2 !isop #NickServ) && !$istok(Kapris ChanServ Nomercy,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick),32) { 
    msg #NickServ $2 : $nick size yardım vermek için söz hakkı (voice) vermiştir. Lütfen sorununuzu kısa/açık/net şeklinde iletiniz.  
    $iif(!$hget($b(NSVoice)),hmake $b(NSVoice))
    .hinc $b(NSVoice) $nick
    .hsave $b(NSVoice) $bs(NSVoice)
  }
  if $istok($trglobal,$chan,32) && ($1 == -h) && ($2 != $nick) && !$istok(Nomercy ChanServ OperServ irc.Kapris.Net $son.isim,$nick,32) && ($2 ison #opers) { os mode $chan +h $2 }
}
alias trglobal { return $hget(trglobal,trglobal) }

on *:join:#: {
  if ($chan == #Yurtdisi) && !$istok($salesmaster,$nick,32) && ($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) !ison #Sales-Yönetim) { os raw svspart $nick :#Yurtdisi }
  if ($chan == #Dj) { .timer 1 1 .csrdjkontrol $nick }
  if $istok($trglobal,$chan,32) && ($hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) == güvenlik) && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$nick),1,32),32) { var %admin.bildirim Sunucu $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    hadd -mu2 op.bildirim $iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) na
    var %mesaj %admin.bildirim Güvenlik Departman $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $sec.master,Lideri,Yetkilisi) 
    $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $sec.master,sw nomercy privmsg $chan $chr(160)) 
    sw nomercy privmsg $chan $qt3(® $son.isim IRCd ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
    $iif($nick = $sec.master,sw nomercy privmsg $chan $chr(160)) 
  }
  if $istok($trglobal,$chan,32) && ($hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) == xline) && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$nick),1,32),32) { var %admin.bildirim Sunucu $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    hadd -mu2 op.bildirim $iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) na
    var %mesaj %admin.bildirim XLine Departman $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $xline.master,Lideri,yetkilisi)
    $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $xline.master,sw nomercy privmsg $chan $chr(160)) 
    sw nomercy privmsg $chan $qt3(® $son.isim IRCd ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
    $iif($nick = $xline.master,sw nomercy privmsg $chan $chr(160)) 
  }
  if $istok($trglobal,$chan,32) && $istok($gsrm $gsrm,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick),32) && $hmatch(greet,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) && ($nick ison #opers) {
    hadd -mu2 op.bildirim $iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) na
    sw nomercy privmsg $chan $chr(160)
    sw nomercy privmsg $chan $qt3(® $son.isim Root ®) 14Sunucu Genel Sorumlusu ve Üst Yönetim Lideri *  $qt3($nick)  14* $chan kanalına girdi.
    sw nomercy privmsg $chan Şikayet ve sorunlarınıza yardim için #Operhelp veya #Yönetim kanalını kullanabilirsiniz. Luzumsuz rahatsiz etmeyin lüfen.
    sw nomercy privmsg $chan $chr(160)
  }
  if $istok($trglobal,$chan,32) && $regex($hget(greet,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),/.+Genel.+Sorumlu.+Yardımcısı/Si) && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$nick),1,32),32) { var %admin.bildirim $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    var %mesaj $iif(%admin.bildirim,$v1) Sunucu Genel Sorumlu Yardımcısı
    hadd -mu2 op.bildirim $nick na
    sw nomercy privmsg $chan $chr(160)
    sw nomercy privmsg $chan $qt3(® $son.isim Admin ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
    sw nomercy privmsg $chan $chr(160)
  }
  if $istok($trglobal,$chan,32) && $regex($hget(greet,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),Sunucu Vip Lideri) && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$nick),1,32),32) { var %admin.bildirim Sunucu $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    hadd -mu2 op.bildirim $iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) na
    var %mesaj %admin.bildirim Sunucu Vip Lideri 
    sw nomercy privmsg $chan $chr(160)
    sw nomercy privmsg $chan $qt3(® $son.isim Admin ®) $qt.6(%mesaj) * $qt3($nick) * 14kanala girdi.
    sw nomercy privmsg $chan $chr(160)
  }
  if $istok($trglobal,$chan,32) && $hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) = Sales && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$nick),1,32),32) { var %admin.bildirim Sunucu $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    var %mesaj $iif(%admin.bildirim,$v1) Sales Departman $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $Sales.Master,Lideri,Yetkilisi)  
    hadd -mu2 op.bildirim $iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) na
    $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $Sales.Master,sw nomercy privmsg $chan $chr(160)) 
    sw nomercy privmsg $chan $qt3(® $son.isim $iif($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $Sales.Master,Root,IRCd) ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
    $iif($nick = $Sales.Master,sw nomercy privmsg $chan $chr(160)) 
  }

  if $istok($trglobal,$chan,32) && $istok(Nickserv ChanServ,$hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),32) && $istok($cs.master $ns.master,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick),32) && ($nick ison #opers) {
    hadd -mu2 op.bildirim $nick na
    sw nomercy privmsg $chan $chr(160)
    sw nomercy privmsg $chan $qt3(® $son.isim Root ®) $qt.6(Sunucu $ii($iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick) = $cs.master,Chanserv,Nickserv) Lideri ve Sunucu Üst Yöneticisi) * $qt3($nick) * 14Kanala Girdi.
    sw nomercy privmsg $chan $chr(160)
  }
  if $istok($trglobal,$chan,32) && $istok(Nickserv ChanServ,$hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),32) && !$istok($cs.master $ns.master,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick),32)  && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$nick),1,32),32) { var %admin.bildirim $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    var %mesaj $iif(%admin.bildirim,$v1) $bb.ok($hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick))) Departman yetkilisi
    hadd -mu2 op.bildirim $nick na
    sw nomercy privmsg $chan $qt3(® $son.isim IRCd ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
  }
  if $istok($trglobal,$chan,32) && !$regex($hget(greet,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),/^Sunucu.+Genel.+Sorum(lu|su).+|.+Lideri.+/i) && ($hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) == ÜstYönetim) && ($nick ison #opers) {
    if $istok(Root Super Network,$gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32),32) { var %admin.bildirim Sunucu $gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32) Admini ve }
    var %mesaj $iif(%admin.bildirim,$v1) Sunucu Üst Yönetim Yetkilisi 
    sw nomercy privmsg $chan $chr(160)
    sw nomercy privmsg $chan $qt3(® $son.isim Root ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
    sw nomercy privmsg $chan $chr(160)
  }
  if $istok($trglobal,$chan,32) && !$hget(greet,$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) && !$hmatch($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) && $hmatch($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) && ($nick ison #opers) && !$istok(IrCbaStarD,$nick,32) {
    if $istok(Root Super,$gettok($hget($b(oy),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)),1,32),32) { var %admin.bildirim ok }
    $iif(%admin.bildirim = ok,sw nomercy privmsg $chan $chr(160)) 
    sw nomercy privmsg $chan $qt3(® $son.isim IRCd ®) $qt.6(Sunucu $iif($hget($b(oy),$nick),$hget($b(oy),$nick),Yöneticilerimizden)) * $qt3($nick) * 14Kanala Girdi. 
    $iif(%admin.bildirim = ok,sw nomercy privmsg $chan $chr(160)) 
  }
  if $istok(#Sales-yönetim #Sales,$chan,32) && ($hget($b(Departman),$iif($gettok($hget(eski.dj,nick),1,32) = $nick,$gettok($hget(eski.dj,nick),2,32),$nick)) != sales) && ($nick ison #opers) && !$istok($masternick LOG L0G $sys.botlar $Sales.Master,$nick,32) { 
    if $read(txt/salesyetki.txt,w,$nick) { return } 
    sapart $nick $chan 
    msg $chan $nuyari 4 $nick nicki $chan kanalına yetkisiz giriş yaptığı için çıkarıldı. 
    sw nomercy privmsg #opers $nuyari 4 $nick nicki $chan kanalına yetkisiz giriş yaptığı için çıkarıldı. 
  }
  if $regex($hget(greet,$nick),Sunucu.+Vip.+Lideri) && $istok($trglobal,$chan,32) && !$istok($masternick LOG L0G $sys.botlar $Sales.Master,$nick,32) && $nick ison #Opers {
    var %mesaj Sunucu VIP Lideri
    sw nomercy privmsg $chan $chr(160)
    sw nomercy privmsg $chan $qt3(® $son.isim VIP ®) $qt.6(%mesaj) * $qt3($nick) * 14Kanala Girdi.
    sw nomercy privmsg $chan $chr(160)
  }
  if $istok(#vip #vip@,$chan,32) {
    if ($nick ison #opers) && !$hmatch(VipYetki,$nick) && !$istok($vipmaster $sys.botlar,$nick,32) && ($nick !ison #sales-Yönetim) { 
      .os raw svspart $nick :#Vip,#Vip@ 
      .msg $nick $nuyari $nick #Vip kanalına giriş izniniz yok. Lütfen Vip Lideri4 $hfind(greet,*vip*lider*,1,w).data görüşünüz.  
      sw nomercy privmsg #Opers $nuyari $nick yetkilisi #VIP kanalına yetkisiz giriş yaptığı için çıkarıldı.
    }
  }
}

on *:nick: { 
  if $istok(IrCbaStarD srjn,$nick,32) || $istok(IrCbaStarD srjn,$newnick,32) { return }
  if $newnick ison #Opers {
    a.join.host $newnick SRJN
  }
  if ($newnick == Açe) && ($newnick !ison #opers) { sw nomercy ns ridentify $newnick }
  if $nick(#opers,$newnick) && !$istok($masternick $sys.botlar $botnick,$nick,32) && !$istok($masternick $sys.botlar LOG L0G Departman IrCbaStarD $botnick,$newnick,32) && !$hget(ilkdegis,$nick) && !$hget(ilkdegis,$newnick) {
    if $istok($masternick $sys.botlar $botnick,$nick,32) || $hmatch($b(oy),$newnick) || $istok($masternick $sys.botlar Log L0G Departman IrCbaStarD $botnick,$newnick,32) || *Tech-v6* iswm $newnick || *Tech-v6* iswm $nick || *dj* iswm $nick || *dj* iswm $newnick  || *AWAY* iswm $newnick || *AWAY* iswm $nick || *Kapris* iswm $nick || $son.isim isin $newnick || *yay?nda* iswm $nick || *yay?nda* iswm $newnick { return }
    if $newnick = $nick { return }
    if $nick(#admin,$nick) || $nick($salesyonetim,$nick) || $hmatch($b(oy),$newnick) || $nick($salesyonetim,$newnick) || $b.nick.tag $+ * iswm $nick || $b.nick.tag $+ * iswm $newnick || $nick($nsyonetim,$nick) || $nick(#K-Admin,$nick) || $nick(#K-Admin,$newnick)  || $nick($nsyonetim,$newnick) || $nick(#yönetim,$nick) || $nick(#yönetim,$newnick) || $nick ison #Yönetim || $nick == LOG || $newnick == L0G || ($newnick ison #Admin) || ($newnick ison #Yönetim) { return }
    sw nomercy privmsg #Opers $qt8($newnick) Oper ve Adminlerin nick değiştirmesi yasaktir.
    .hinc -mu4 ilkdegis $nick
    sw nomercy os raw svsnick $newnick $nick :0
  }
  if $hfind($b(badnick),$newnick,1,W).data && !$hfind($b(bmuaf),$newnick,1,W).data { 
    os raw svsnick $newnick $+($son.isim,-,$r(99,999999)) :*
  }
  if ($nick == $newnick) { halt }
  if ($nick == Kapris) { 
    /oper $qoperpass
    /nick $son.bot.nick
    /ns identify $qnickpass
    /os su $qsupass
  }
}

on *:snotice:*:{
  if $hget(IrC,baStarD) = ok { return }
  if *[Spamfilter]* iswm $1- {
    var %s $replace($1-,$chr(39),$chr(175))
    tokenize 175 %s
    if $0 = 5 {
      var %spm $2,%user $3, %ke $4
    }
    elseif $0 = 6 {
      var %spm $+($2,',$3), %user $4, %ke $5
    }
    elseif $0 = 7 {
      var %spm $+($2,',$3,',$4),%user $5, %ke $6
    }
    elseif $0 = 8 {
      var %spm $+($2,',$3,',$4,',$5),%user $6, %ke $7
    }
    elseif $0 = 9 {
      var %spm $+($2,',$3,',$4,',$5,',$6),%user $7, %ke $8
    }
    var %id $+(id-,$r(1000,999999999999),-,$ctime)
    hadd -m $b(SPveri) %id %ke $chr(175) %spm $chr(175) $gettok($remove($1,matches filter,[Spamfilter]),1,$asc(!)) $chr(175) $remove(%user,: [PRIVMSG,:)
    hsave $b(SPveri) $bs(SPveri)
  }
}
