Advertisement
Guest User

Untitled

a guest
Jun 21st, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.83 KB | None | 0 0
  1. alias -l ht2 {
  2.   if ($version >= 7) || ($1 <= 255) { returnex $chr($1) }
  3.   else {
  4.     if ($1 >= 256) && ($1 < 2048) returnex $chr($calc(192 + $int($calc($1 / 64)))) $+ $chr($calc(128 + ($1 % 64)))
  5.     elseif ($1 >= 2048) && ($1 < 65536) returnex $+($chr($calc(224 +  $int($calc($1 / 4096)))),$chr($calc(128 + ($int($calc($1 / 64)) % 64))),$chr($calc(128 + ($1 % 64))))
  6.     elseif ($1 >= 65536) && ($1 < 2097152) returnex $+($chr($calc(240 +  $int($calc($1 / 262144)))),$chr($calc(128 + ($int($calc($1 / 4096)) % 64))),$chr($calc(128 + ($int($calc($1 / 64)) % 64))),$chr($calc(128 + ($1 % 64))))
  7.   }
  8. }
  9. alias -l html_fix {
  10.   if (!$1) { return }
  11.   if (#x* iswm $1) { return $ht2($base($mid($1,3),16,10)) }
  12.   if (#* iswm $1) { return $ht2($mid($1,2)) }
  13.   return $1-
  14. }
  15.  
  16. alias html2asciix { return $regsubex(~, $1, /&(.+);/Ug, $html_fix(\t)) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement