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: 693
Function: getPaste

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

irc2speech.py - Stikked
From Morose Giraffe, 12 Years ago, written in Python.
Embed
  1. #!/usr/bin/python2.6
  2.  
  3. import socket, os
  4.  
  5. class Bot:
  6.  
  7.     def __init__(self, network, channel, botname, username):
  8.         self.username = username
  9.         self.irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  10.         self.irc.connect((network, 6667))
  11.         print self.irc.recv(1024)
  12.         self.send('NICK ' + botname)
  13.         self.send('USER botty botty botty :Python IRC')
  14.         self.send('JOIN ' + channel)
  15.         self.loop()
  16.  
  17.     def send(self, text):
  18.         self.irc.send(text + '\r\n')
  19.  
  20.     def say_aloud(self, text):
  21.         pipe = os.popen('festival --tts', 'w')
  22.         pipe.write(str(text))
  23.  
  24.     def loop(self):
  25.         while True:
  26.             data = self.irc.recv(1024)
  27.             if data.find('PING') != -1:
  28.                 self.send('PONG ' + data.split()[1])
  29.             elif data.find(self.username + ': ') != -1:
  30.                 msg = str(' '.join(data.split()[4:]))
  31.                 self.say_aloud(msg)
  32.             print data
  33.  
  34. b = Bot('irc.rizon.net', '#test0128', 'randpy0128', 'longneck')
  35.