Advertisement
bocah_strez

user log

Jan 4th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. :local low ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
  2. :local upp ("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
  3.  
  4. :local result;
  5. :local new;
  6.  
  7. :for i from=0 to=([:len $user] - 1) do={
  8. :local char [:pick $user $i];
  9.  
  10. :if ($char = " ") do={
  11. :set $char " ";
  12. :set $new ($new . $char)
  13. }
  14.  
  15. :for a from=0 to=([:len $low] - 1) do={
  16.  
  17. :local l [:pick $low $a];
  18.  
  19.  
  20. :if ( $char = $l) do={
  21. :local u [:pick $upp $a];
  22. :set new ($new .$u);
  23. }
  24. }
  25. }
  26. :log error "The New String in Upper case is: $new";
  27. #yang diatas adalah string ubah huruf kecil jadi besar
  28. :local CurDate [/system clock get time]
  29. :local sisa [/ip hotspot user get [find name=$user] uptime]
  30. :local out [/ip hotspot user get [find name=$user] bytes-out]
  31. :local in [/ip hotspot user get [find name=$user] bytes-in]
  32. :local kuota [/ip hotspot user get [find name=$user] limit-bytes-total]
  33. :local put [(($in+$out)/1048576)]
  34. :local putall [(($kuota)/1048576)]
  35. :local sisall [(($putall)-($put))]
  36. /tool fetch url="https://api.telegram.org/bot351384033:AAHzoCQ4VcdV71ZHfI59LCjOCdf_wD_5VQs/sendMessage\?chat_id=130513473&text=$new Login WIFI = Nama: $user <=> IP: $address <=> Pd Jam: $CurDate Lama-OL $sisa Total Kuota $putall MB kuota terpakai $put MB dan Sisa Kuota $sisall MB
  37. " keep-result=no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement