IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   mIRC Scripting Sorunları (https://www.ircforumlari.net/mirc-scripting-sorunlari/)
-   -   Çözüldü Kod hk.yardım (https://www.ircforumlari.net/mirc-scripting-sorunlari/991817-kod-hkyardim.html)

Yasakkk 18 Kasım 2022 04:24

Kod hk.yardım
 
Kod:

on *:input:*: {
if ($regex($1,/(^[!]ekle$)/i)) {
if !$2 { echo -a Nick / Ident / IP belirtmediniz! | halt }
if $read(zline.txt,w,$+(*:,$2,*)) { echo -a Zaten $token($read(zline.txt,w,$+(*,$2,*)),1,58) listeye ekli | halt }
if $regex($left($2,1),@) { echo -a Ident listeye eklendi! | write zline.txt $+(Ident:,$2) | halt }
if $regex($2,\d) && $regex($2,\W) { echo -a IP listeye eklendi! | write zline.txt $+(IP:,$2) | halt }
echo -a Nick listeye eklendi! | write zline.txt $+(Nick:,$2)
}
if ($regex($1,/(^[!]((ç|c)(i|ı)kar|s(i|ı)l)$)/i)) {
if !$2 { echo -a Nick / Ident / IP belirtmediniz! | halt }
if $regex($left($2,1),@) && $regex($2,$chr(64)) && !$read(zline.txt,w,$+(*,$2,*)) { echo -a Ident listede bulunmuyor! | halt }
if $regex($2,\d) && $regex($2,\W) && !$read(zline.txt,w,$+(*,$2,*)) { echo -a IP zaten listede bulunmuyor! | halt }
if !$read(zline.txt,w,$+(*,$2,*)) { echo -a Nick zaten listede bulunmuyor! | halt }
echo -a $token($read(zline.txt,w,$+(*,$2,*)),1,58) Listeden silindi! | write $+(-dl,$readn) zline.txt
}
if ($regex($1,/(^[!]l(i|ı)st$)/i)) {
if !$2 { echo -a Nick / Ident / IP belirtmediniz! | halt }
if (!$regex($2,/(ip|ident|nick)/i)) { echo -a $qt($2) Adın da, mask bulunmuyor. Masklar: IP / Ident / Nick | halt }
if ($lines(zline.txt) == 0) { echo -a Listede hiç bir kayıt bulunmamaktadir! | halt }
if $masks($2) == 0 { echo -a $2 Listesinde kayıt bulunmuyor! | halt }
echo -ae $2 listesi -
var %s 1 | while (%s <= $lines(zline.txt)) { $iif($2 isin $read(zline.txt,%s),echo -a $+(%s,]) $replace($read(zline.txt,%s),$chr(58),$+(:,$chr(32)))) | inc %s
}
echo -ae List sonu.
}
}
alias masks { var %s 1 | while (%s <= $lines(zline.txt)) { $iif($1 isin $read(zline.txt,%s),return 1) | inc %s } return 0 }
on *:snotice:*connecting*: {
var %s 1, %nick $9, %ident $right($token($10,1,64),-1), %ip $remove($token($10,2,64),$chr(41))
while (%s <= $lines(zline.txt)) {
$iif($regex($read(zline.txt,%s),/Ident/i),$iif($right($gettok($read(zline.txt,%s),2,58),-1) == %ident,gzline %nick +0 Forbidden Tion! $+([Data:,%ident,]) ))
$iif($regex($read(zline.txt,%s),/IP/),$iif($gettok($read(zline.txt,%s),2,58) == %ip,gzline %nick +0 Forbidden Tion! $+([Data:,%ip,]) ))
$iif($regex($read(zline.txt,%s),/Nick/i),$iif($gettok($read(zline.txt,%s),2,58) iswm %nick,gzline %nick +0 Forbidden Tion! $+([Data:,%nick,]) ))
inc %s
}
}

Elimde böyle bir kod mevcut bu kodu benim belirlediğim kanalda örnek #X kanalında benim belirlediğim kişiler kullansın. bota eklemeyi düşünüyorum yardımcı olabilecek varmı.

Bozkurt- 18 Kasım 2022 21:09

Cevap: Kod hk.yardım
 
Kod:

on *:text:*:#Opers:{
  if ($regex($1,/(^[-.!]ekle$)/i)) {
    if !$2 { msg #Opers Nick / Ident / IP belirtmediniz! | halt }
    if $read(zline.txt,w,$+(*:,$2,*)) { msg #Opers Zaten $token($read(zline.txt,w,$+(*,$2,*)),1,58) listeye ekli | halt }
    if $regex($left($2,1),@) { msg #Opers Ident listeye eklendi! | write zline.txt $+(Ident:,$2) | halt }
    if $regex($2,\d) && $regex($2,\W) { msg #Opers IP listeye eklendi! | write zline.txt $+(IP:,$2) | halt }
    msg #Opers Nick listeye eklendi! | write zline.txt $+(Nick:,$2)
  }
  if ($regex($1,/(^[-.!]((ç|c)(i|ı)kar|s(i|ı)l)$)/i)) {
    if !$2 { msg #Opers Nick / Ident / IP belirtmediniz! | halt }
    if $regex($left($2,1),@) && $regex($2,$chr(64)) && !$read(zline.txt,w,$+(*,$2,*)) { msg #Opers Ident listede bulunmuyor! | halt }
    if $regex($2,\d) && $regex($2,\W) && !$read(zline.txt,w,$+(*,$2,*)) { msg #Opers IP zaten listede bulunmuyor! | halt }
    if !$read(zline.txt,w,$+(*,$2,*)) { msg #Opers Nick zaten listede bulunmuyor! | halt }
    msg #Opers $token($read(zline.txt,w,$+(*,$2,*)),1,58) Listeden silindi! | write $+(-dl,$readn) zline.txt
  }
  if ($regex($1,/(^[-.!]l(i|ı)st$)/i)) {
    if !$2 { msg #Opers Nick / Ident / IP belirtmediniz! | halt }
    if (!$regex($2,/(ip|ident|nick)/i)) { msg #Opers $qt($2) Adın da, mask bulunmuyor. Masklar: IP / Ident / Nick | halt }
    if ($lines(zline.txt) == 0) { msg #Opers Listede hiç bir kayıt bulunmamaktadir! | halt }
    if $masks($2) == 0 { msg #Opers $2 Listesinde kayıt bulunmuyor! | halt }
    msg #Opers $2 listesi -
    var %s 1 | while (%s <= $lines(zline.txt)) { $iif($2 isin $read(zline.txt,%s),msg #Opers $+(%s,]) $replace($read(zline.txt,%s),$chr(58),$+(:,$chr(32)))) | inc %s
    }
    msg #Opers List sonu.
  }
}
alias masks { var %s 1 | while (%s <= $lines(zline.txt)) { $iif($1 isin $read(zline.txt,%s),return 1) | inc %s } return 0 }
on *:snotice:*connecting*: {
  var %s 1, %nick $9, %ident $right($token($10,1,64),-1), %ip $remove($token($10,2,64),$chr(41))
  while (%s <= $lines(zline.txt)) {
    $iif($regex($read(zline.txt,%s),/Ident/i),$iif($right($gettok($read(zline.txt,%s),2,58),-1) == %ident,gzline %nick +0 Forbidden Tion! $+([Data:,%ident,]) ))
    $iif($regex($read(zline.txt,%s),/IP/),$iif($gettok($read(zline.txt,%s),2,58) == %ip,gzline %nick +0 Forbidden Tion! $+([Data:,%ip,]) ))
    $iif($regex($read(zline.txt,%s),/Nick/i),$iif($gettok($read(zline.txt,%s),2,58) iswm %nick,gzline %nick +0 Forbidden Tion! $+([Data:,%nick,]) ))
    inc %s
  }
}

Basit bir şekilde. #Opers olan yerleri hangi kanal olarak istiyorsan o şekilde ayarla. input senin kullanman için text başkasının kullanması içindir. Bu eventler ve echo kısımları dışında değişen bir şey olmaz. echo -a olan yerleri msg #kanal input eventini de text olarak değiştirdim. Eski hali çalışıyor ise bu hali de çalışacaktır.


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 20:12.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk