Jump to content

I Need Help With This Kicks Logger


TaReK

Recommended Posts

Well .. this Kicks Logger was assigned to work with IRCx servers .. i've been trying to modify it to work with IRCd ... and it never shows logs ...

It shows there are recorded logs but it never shows the logs and its information

it shows it like that

[ Total : 7 logs ] Searching For Users Matching Your Request.

1-

2-

3-

4-

5-

6-

7-

8-

9-

10- [.logs 0 for the next 10 logs.]

.. Beside i'ld like to note that there's a miss-spelling in the file kickadress.txt , its mis-spelled in the script directory too ...

there's the code

on *:kick:#:{
  if ($lines(TEXT\Kicklog\kicklog.txt) >= 100) { write -dl100 TEXT\Kicklog\kicklog.txt | write -dl100 TEXT\Kicklog\kickadress.txt | write -dl100 TEXT\Kicklog\kickinfo.txt }
  write -il1 TEXT\Kicklog\kicklog.txt $nick $knick
  write -il1 TEXT\Kicklog\kickadress.txt $address($knick,1) $address($knick,5) $address($knick,6) *! $+ $$ial($knick $+ *,1).addr
  write -il1 TEXT\Kicklog\kickinfo.txt # $+ * $+ $date at $time $+ * $+ $1-
  set -u60 %kkcomand kicked
}
on admin:TEXT:*.logs*:#: {
  if ($2 isalpha) { msg $chan Be smart ! $chr(91) example: .logs 11, will show logs starting from log number 11 $chr(93) | halt }
  msg $chan $chr(91) Total : $lines(TEXT\Kicklog\kicklog.txt) logs $chr(93) 
Searching For Users Matching Your Request.
  $iif($2 isnum, %i = $2, %i = 1)
  var %f 1
  while (%i <= $calc($2 + 10)) {
    if ($lines(TEXT\Kicklog\kicklog.txt) < %i) { var %endit true | goto msgit }
    set %log $+ %f $chr(91) $+ %i $+ $chr(93) $findkick($read(TEXT\Kicklog\kicklog.txt, %i),2) : * $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,1),4),9),*!) $+ * | inc %f
    inc %i
  }
  :msgit
  msg $chan 1- $+ %log1 | msg $chan 2- $+ %log2 | msg $chan 3- $+ %log3 | msg $chan 4- $+ %log4 | msg $chan 5- $+ %log5 | msg $chan 6- $+ %log6
  msg $chan 7- $+ %log7 | msg $chan 8- $+ %log8 | msg $chan 9- $+ %log9 | msg $chan 10- $+ %log10  $chr(91) $+ .logs $calc($2 + 11)) for the next 10 logs. $+ $chr(93) 
  if (%endit == true) { msg $chan $chr(91) End Of Logs. $chr(93) | halt }
  unset %log1 | unset %log2 | unset %log3 | unset %log4 | unset %log5 | unset %log6 | unset %log7 | unset %log8 | unset %log9 | unset %log10 | unset %log11
}

;---------veiw log
on admin:TEXT:*.inf*:#: {
  if ($2 isalpha) { msg $chan $chr(91) Please Define an entry number $chr(93) | halt }
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) | halt
  }
  msg $chan Name: $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) 
  Gate - *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$* 
 Kicked By : $findkick($read(TEXT\Kicklog\kicklog.txt,$2),1) 
 Kick Time : $findinfo($read(TEXT\Kicklog\kickinfo.txt,$2),1) 
 Reason : $findinfo($read(TEXT\Kicklog\kickinfo.txt,$2),2)
}
on admin:TEXT:*.unban*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) | halt
  }
  access # delete deny $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),1)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),2)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),3)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),4)
  access # delete deny *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$*
  msg $chan $chr(45) Deny for $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) : *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$* has been cleared.
}
on admin:TEXT:*.ban*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) | halt
  }
  access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),4) 
  msg $chan $chr(45) $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) : *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$* Has been banned.
}

;Fast commands
on admin:TEXT:*.rd*:#: {
  access # delete deny $findkick($read(TEXT\Kicklog\kicklog.txt,1),2)
  access # delete deny $findkick($read(TEXT\Kicklog\kicklog.txt,1),3)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),1)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),2)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),3)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),4)
  access # delete deny *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,1),4),18),*!) $+ @*$*
  msg $chan $chr(45) Deny for $findkick($read(TEXT\Kicklog\kicklog.txt,1),2) : $findkick($read(TEXT\Kicklog\kickadress.txt,1),5) has been cleared.
}
on admin:TEXT:*.banl*:#: {
  access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),4) : $+ $chr(91) $+ Darkness Kicks Loger $+ $chr(93)
  msg $chan $chr(45) $findkick($read(TEXT\Kicklog\kicklog.txt,1),2) : *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,1),4),18),*!) $+ @*$* Has been banned.  
}
on owner:TEXT:*.cl*:#: {
  access # delete deny $findkick($read(TEXT\Kicklog\kicklog.txt,1),2)
  access # delete deny $findkick($read(TEXT\Kicklog\kicklog.txt,1),3)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),1)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),2)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),3)
  access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,1),4)
  access # delete deny *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,1),4),18),*!) $+ @*$*
  msg $chan $chr(45) Deny for $findkick($read(TEXT\Kicklog\kicklog.txt,1),2) : *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,1),4),18),*!) $+ @*$* has been cleared. 
}
on admin:TEXT:*.sl*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$2),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($3 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$3),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$3),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$3),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$3),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$3),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$3),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$3),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$3),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($4 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$4),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$4),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$4),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$4),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$4),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$4),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$4),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$4),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($5 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$5),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$5),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$5),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$5),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$5),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$5),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$5),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$5),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($6 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$6),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$6),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$6),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$6),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$6),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$6),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$6),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$6),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($7 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$7),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$7),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$7),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$7),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$7),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$7),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$7),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$7),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($8 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$8),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$8),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$8),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$8),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$8),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$8),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$8),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$8),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($9 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$9),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$9),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$9),2)  $+ $chr(93) allready shitlisted. }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$9),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$9),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$9),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$9),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$9),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($10 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$10),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$10),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$10),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$10),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$10),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$10),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$10),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$10),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($11 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %chek = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$11),2),)) 
  if (%chek) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$11),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$11),2)  $+ $chr(93) allready shitlisted.  }
  if (!%chek) { 
    write -il1 TEXT\shitlist.txt $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$11),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$11),2) 
    access # add deny $findkick($read(TEXT\Kicklog\kickadress.txt,$11),4) :Sitlisted $chr(91) $+ By Darkness $+ $chr(93)
    msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$11),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$11),2) $+ $chr(93) has been added to the Shitlist . 
  }
  if ($12 == !$null) { msg $chan $chr(91) End. $chr(93) |  halt }
}
on admin:TEXT:*.rsl*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$2),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$2),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($3 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$3),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$3),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$3),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$3),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($4 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$4),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$4),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$4),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$4),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($5 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$5),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$5),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$5),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$5),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($6 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$6),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$6),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$6),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$6),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($7 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$7),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$7),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$7),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$7),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($8 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$8),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$8),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$8),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$8),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($9 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$9),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$9),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$9),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$9),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($10 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$10),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$10),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$10),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$10),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($11 == $null) { msg $chan $chr(91) End. $chr(93) |  halt }
  var %rlst = $read(text\shitlist.txt,w,$+(*,$findkick($read(TEXT\Kicklog\kicklog.txt,$11),2),)) 
  var %line $readn
  if (!%rlst) { msg $chan $chr(91) $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$11),4),18),*!) - $findkick($read(TEXT\Kicklog\kicklog.txt,$11),2) $+ $chr(93) Can't Found in the shitlist Users File. } 
  if (%rlst) {
    write -dl $+ %line TEXT\shitlist.txt
    access # delete deny $findkick($read(TEXT\Kicklog\kickadress.txt,$11),4)
    msg $chan $chr(91) $+ %rlst $+ $chr(93) Removed of the shitlist.  
  }
  if ($12 == !$null) { msg $chan $chr(91) End. $chr(93) |  halt }
}

i hope i could get help ... please test it .... thx for who will help !!

Link to comment
Share on other sites

Guest Travis

There are a number of issues with this script. The main reason why this isn't working is because it is looking for an alias called findkick.

 

$findkick($read(TEXT\Kicklog\kicklog.txt, %i),2)

 

Since there is no alias it gives you a $null, or blank, result.

 

Replace the admin:text event with this.

 

 

on admin:TEXT:*.logs*:#:{
  if ($2 isalpha) { msg $chan Be smart ! $chr(91) example: .logs 11, will show logs starting from log number 11 $chr(93) | return }
  msg $chan $chr(91) Total : $lines(TEXT\Kicklog\kicklog.txt) logs $chr(93) Searching For Users Matching Your Request.
;set these as local variables so they unset themselves.
;%f will now count down from 10 making sure you return 10 results per request.
;fixed %i to have less text.
  var %f = 10, %i = $iif($2 isnum,$2,1)

;this will be true as long as there is data on the line %i, otherwise it will skip past the while loop and say end of logs.
  while ($read(TEXT\Kicklog\kicklog.txt,%i)) {
;msg chan Line#, Kicklog, Kickaddress
    msg # $+(%i,.) $read(TEXT\Kicklog\kicklog.txt, %i) : * $+ $remove($left($read(TEXT\Kicklog\kickadress.txt,%i),9),*!) $+ *

;increase line number, decrease total result number
    inc %i | dec %f

i;if %f = 0 ($null) announce end of logs,
    if (!%f) {
      msg # $chr(91) End Of Logs. $chr(93)
      break
    }
  }
;if there is any other reason why the log ends, announce end of logs.
  msg # $chr(91) End Of Logs. $chr(93)
}

 

The rest of the script relies heavily on the findkick alias. Without that it won't work.

Edited by Travis
Link to comment
Share on other sites

Travis .. thx man .. i got it fixed and its working successfully .. I'm sorry i was late but i was away from PC for couple of days ..

Any way .. can u help me how could i fix this code .. i get blank replies from the logger when i try this

like that

2:17] « @ » • « ProTecToR » - Deny for : *!@*$* has been cleared.

[02:21] « @ » • « ProTecToR » - : *!@*$* Has been banned.

 

there's the code

 

on admin:TEXT:*.unban*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) | halt
  }
  mode # -b $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2)
  mode # -b $findkick($read(TEXT\Kicklog\kicklog.txt, %i,$2),2)
  mode # -b $findkick($read(TEXT\Kicklog\kickadress.txt,$2),2)
  mode # -b $findkick($read(TEXT\Kicklog\kickadress.txt,$2),3)
  mode # -b $findkick($read(TEXT\Kicklog\kickadress.txt,$2),4)
  mode # -b *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$*
  msg $chan $chr(45) Deny for $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) : *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$* has been cleared.
}

There's the Other One ..

on admin:TEXT:*.ban*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) | halt
  }
  mode # +b $findkick($read(TEXT\Kicklog\kickadress.txt,$2),4) 
  msg $chan $chr(45) $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2) : *! $+ $remove($left($findkick($read(TEXT\Kicklog\kickadress.txt,$2),4),18),*!) $+ @*$* Has been banned.
}

Thx for support !!

Link to comment
Share on other sites

yes man .. there's the find kick alias

 

findkick { return $gettok($1,$2,32) }
findinfo { return $gettok($1,$2,$asc(*)) }
But it's still replying blanks

Thx !!

Edited by TaReK
Link to comment
Share on other sites

Guest Travis

This is how you test and fix your code. Use /echo to find out what your info is returning.

 

 

on admin:TEXT:*.unban*:#: {
  if ($2 == $null) { msg $chan $chr(91) Please Define an entry. $chr(93) | halt
  }

if (!$window(@test)) window -e @test
echo @test mode # -b $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2)


  mode # -b $findkick($read(TEXT\Kicklog\kicklog.txt,$2),2)

So let's say you echo this and it returns nothing as you say. So then you start whittling it down.

 

echo @test mode # -b $read(TEXT\Kicklog\kicklog.txt,$2)

 

If this returns something you can see why the findkick alias didnt work like you wanted. If it doesn't you can figure out why it isn;t either reading the text file or writing to it in the first place.

 

This is basic troubleshooting, how you fix your own code. To help you I would ask what the $read echo's. So work with this. if you are still stumped, show us what the echo's are and we can go from there.

Link to comment
Share on other sites

Guest Travis

So let's say you echo this and it returns nothing as you say. So then you start whittling it down.

 

echo @test mode # -b $read(TEXT\Kicklog\kicklog.txt,$2)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...