Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function priv_estimate($line, $args)
  2.     {
  3.         $strip = array('\'', "\"");
  4.         $channel = $line["to"];
  5.         $nick = $line["fromNick"];
  6.         $host = $line["from"];
  7.         $mhash = (int)str_replace($strip, "", trim($args["arg1"]));
  8.         if ($mhash <= 0 or $mhash >= 9223372036854775807) {
  9.             $this->ircClass->privMsg("$channel", "check input");
  10.             return;
  11.         }
  12.         $khash = $mhash * 1000;
  13.  
  14.         $diff = $this->bitcoin->getdifficulty();
  15.  
  16.         $perday = ($mhash / $diff) * 1005.82838;
  17.         $perhr = $perday / 24;
  18.         $this->ircClass->privMsg("$channel", "The expected generation output, at $mhash MHps, given current difficulty of $diff, is " .
  19.             round($perday, 6) . " BTC per day and " . round($perhr, 6) . " BTC per hour.");
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement