A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 551
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/system/core/Exceptions.php:271)

Filename: view/raw.php

Line Number: 2

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/themes/geocities/views/view/raw.php
Line: 2
Function: header

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/core/MY_Loader.php
Line: 173
Function: include

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/core/MY_Loader.php
Line: 43
Function: _ci_load

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 558
Function: view

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

# Copyright (c) 2012, Aha2Y # All rights reserved. import subprocess import supybot.utils as utils from supybot.commands import * import supybot.plugins as plugins import supybot.ircutils as ircutils import supybot.callbacks as callbacks from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Stats') @internationalizeDocstring class Stats(callbacks.Plugin): """Add the help for "@plugin help Stats" here This should describe *how* to use this plugin.""" threaded = True def ram(self, irc, msg, args): """tells you the ram of the current machine Supybot uses.""" p = subprocess.Popen(["free", "-o"], stdout=subprocess.PIPE) out, err = p.communicate() out = out.split() total = float(out[7])/1024.0/1024.0 using = float(out[8])/1024.0/1024.0 free = float(out[9])/1024.0/1024.0 msg = "Total: {1:4.1f} GB | Used:04 {2:4.1f} GB ({3:>6.2%}) | Free:03 {4:4.1f} GB ({5:>6.2%})" used_red_length = int(round((using/total) * 10.0)) used_green_length = 10 - used_red_length free_red_length = int(round((free/total) * 10.0)) free_green_length = 10 - free_red_length bar1 = "[\0034%s%s\x0f]" % ("|" * used_red_length, " " * used_green_length) bar2 = "[\0033%s%s\x0f]" % ("|" * free_red_length, " " * free_green_length) irc.reply(msg.format("", total, using, using/total, free, free/total), prefixNick=False) irc.reply("Used: %s Free: %s" % (bar1, bar2), prefixNick=False) ram = wrap(ram) def swap(self, irc, msg, args): """tells you the ram of the current machine Supybot uses.""" p = subprocess.Popen(["free", "-o"], stdout=subprocess.PIPE) out, err = p.communicate() out = out.split() total = float(out[14])/1024.0/1024.0 using = float(out[15])/1024.0/1024.0 free = float(out[16])/1024.0/1024.0 msg = "Total: {1:4.1f} GB | Used:04 {2:4.1f} GB ({3:>6.2%}) | Free:03 {4:4.1f} GB ({5:>6.2%})" used_red_length = int(round((using/total) * 10.0)) used_green_length = 10 - used_red_length free_red_length = int(round((free/total) * 10.0)) free_green_length = 10 - free_red_length bar1 = "[\0034%s%s\x0f]" % ("|" * used_red_length, " " * used_green_length) bar2 = "[\0033%s%s\x0f]" % ("|" * free_green_length, " " * free_red_length) irc.reply(msg.format("", total, using, using/total, free, free/total), prefixNick=False) irc.reply("Used: %s Free: %s" % (bar1, bar2), prefixNick=False) swap = wrap(swap) Class = Stats # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: