Advertisement
Guest User

History Channel

a guest
Dec 7th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.33 KB | None | 0 0
  1. alias hlist {
  2.   var %y = 1
  3.   while ($ini(mirc.ini, chanhist, %y)) {
  4.     var %network = $gettok($readini(mirc.ini, chanhist, $ini(mirc.ini, chanhist, %y)), 2,44)
  5.     if ($network == %network) { return 1 }
  6.     inc %y
  7.   }
  8. }
  9. alias wd { return $gettok($1,$2,32) }
  10. alias clear_chanhist { return $dll($_ddir(sendkey.dll),dialog,140) }
  11. alias set.menu {
  12.   if (!$hlist($network)) && ($1 == 1) return $style(2) None:$null
  13.  
  14.   var %y = 1, %enum = 1
  15.   while ($ini(mirc.ini, chanhist, %y)) {
  16.     var %channel = $readini(mirc.ini, chanhist, $ini(mirc.ini, chanhist, %y))
  17.     var %cn %cn $gettok( %channel, 1,44) $+ $chr(124) $+ $gettok( %channel, 2,44)
  18.     inc %y
  19.   }
  20.   var %cn = $sorttok(%cn,32)
  21.   var %f = $numtok(%cn,32)
  22.   var %y = 1
  23.   while (%y <= %f) {
  24.     var %e $replace( $wd( %cn, %y), $chr(124), $chr(32)), %getChannel = $wd(%e,1), %getNetwork = $wd(%e,2)
  25.     if ($1 == %enum) return $iif($network == %getNetwork, $iif($me ison %getChannel, $style(3) %getChannel, $iif($server, %getChannel, $style(2) %getChannel))   %getNetwork) :j %e
  26.     inc %y
  27.     inc %enum
  28.   }
  29. }
  30. menu channel, status {
  31. Favorites
  32. .&Add to Favorites...:{ return $dll($_ddir(sendkey.dll),dialog,141) }
  33. .&Organize Favorites... Alt+J:{ open alt+j }
  34. .-
  35. .History
  36. ..$submenu($set.menu($1))
  37. ..-
  38. ..$iif(!$hlist($network),$style(2)) Clear History:{ clear_chanhist }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement