daily pastebin goal
46%
SHARE
TWEET

/m.stats -s

Seb Feb 10th, 2016 (edited) 117 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;This will show you stats of loaded scripts, and what's in your alias and remotes folder.
  2. ;see: /m.stats
  3. alias m.stats {
  4.   var %dbf $iif($1 == -s,say,echo -at)
  5.   var %aliases.total, %aliases.lines, %aliases.size
  6.   var %remote.total, %remote.lines, %remote.size
  7.   var %x = 1, %y
  8.   %aliases.total = $alias(0)
  9.   while (%x <= %aliases.total) {
  10.     %y = $alias(%x)
  11.     inc %aliases.lines $lines(%y)
  12.     inc %aliases.size $file(%y).size
  13.     inc %x 1
  14.   }
  15.   %x = 1
  16.   %remote.total = $script(0)
  17.   while (%x <= %remote.total) {
  18.     %y = $script(%x)
  19.     inc %remote.lines $lines(%y)
  20.     inc %remote.size $file(%y).size
  21.     inc %x 1
  22.   }
  23.   %dbf [7Aliases(3Loaded)] %aliases.total files, %aliases.lines lines, $bytes(%aliases.size,k) $+ kb
  24.   %dbf [2Remote(3Loaded)] %remote.total files, %remote.lines lines, $bytes(%remote.size,k) $+ kb
  25.   %dbf [4Total] $findfile($scriptdir, *.ini;*.mrc, 0, inc -u %x $lines($1)) scripts, total of $bytes(%x, db) lines.
  26. }
RAW Paste Data
Top