Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function priv_estimate($line, $args)
- {
- $strip = array('\'', "\"");
- $channel = $line["to"];
- $nick = $line["fromNick"];
- $host = $line["from"];
- $mhash = (int)str_replace($strip, "", trim($args["arg1"]));
- if ($mhash <= 0 or $mhash >= 9223372036854775807) {
- $this->ircClass->privMsg("$channel", "check input");
- return;
- }
- $khash = $mhash * 1000;
- $diff = $this->bitcoin->getdifficulty();
- $perday = ($mhash / $diff) * 1005.82838;
- $perhr = $perday / 24;
- $this->ircClass->privMsg("$channel", "The expected generation output, at $mhash MHps, given current difficulty of $diff, is " .
- round($perday, 6) . " BTC per day and " . round($perhr, 6) . " BTC per hour.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement