Ubugtu is dead, long live ubugtu
This commit is contained in:
@ -18,7 +18,7 @@ sys.path.append('/var/www/bots.ubuntulinux.nl')
|
||||
from commoncgi import *
|
||||
|
||||
### Variables
|
||||
db = '/home/dennis/ubugtu/data/bans.db'
|
||||
db = '/home/dennis/ubotu/data/bans.db'
|
||||
num_per_page = 100
|
||||
|
||||
con = sqlite.connect(db)
|
||||
|
@ -19,7 +19,7 @@ from commoncgi import *
|
||||
|
||||
### Variables
|
||||
NUM_PER_PAGE=50.0
|
||||
datadir = '/home/dennis/ubugtu/data/facts'
|
||||
datadir = '/home/dennis/ubotu/data/facts'
|
||||
default_database = 'ubuntu'
|
||||
|
||||
databases = [x for x in os.listdir(datadir)]
|
||||
|
@ -142,7 +142,7 @@ class Encyclopedia(callbacks.Plugin):
|
||||
def get_db(self, channel):
|
||||
db = self.registryValue('database',channel)
|
||||
if channel in self.databases:
|
||||
if self.databases[channel].time < time.time - 3600:
|
||||
if self.databases[channel].time < time.time() - 3600:
|
||||
self.databases[channel].close()
|
||||
self.databases.pop(channel)
|
||||
if channel not in self.databases:
|
||||
@ -156,8 +156,7 @@ class Encyclopedia(callbacks.Plugin):
|
||||
text = text.strip()
|
||||
if text.lower() == self.registryValue('prefixchar', channel=recipients) + irc.nick.lower():
|
||||
return irc.nick.lower()
|
||||
if len(text) and text[0] ==
|
||||
self.registryValue('prefixchar',channel=recipients):
|
||||
if len(text) and text[0] == self.registryValue('prefixchar',channel=recipients):
|
||||
text = text[1:]
|
||||
if text.lower().startswith(irc.nick.lower()) and (len(text) < 5 or not text[5].isalnum()):
|
||||
t2 = text[5:].strip()
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR=/home/dennis/ubugtu/data/apt
|
||||
DIR=/home/dennis/ubotu/data/apt
|
||||
|
||||
for DIST in "$DIR"/*.list; do
|
||||
DIST=${DIST:${#DIR}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR=/home/dennis/ubugtu/data/apt
|
||||
DIR=/home/dennis/ubotu/data/apt
|
||||
|
||||
for DIST in "$DIR"/*.list; do
|
||||
DIST=${DIST:${#DIR}}
|
||||
|
@ -37,10 +37,10 @@ mess = {
|
||||
'mjg59': ('http://www.angryfacts.com', r'</p><h1>(?P<fact>.*?)</h1>', False),
|
||||
'vmjg': ('http://www.rjek.com/vmjg59.cgi', r'<body>(?P<fact>.*?)<p>', True),
|
||||
'vmjg59': ('http://www.rjek.com/vmjg59.cgi', r'<body>(?P<fact>.*?)<p>', True),
|
||||
'bofh': ('/home/dennis/ubugtu/plugins/Mess/bofh.txt', 'BOFH Excuse #%d: ', False),
|
||||
'42': ('/home/dennis/ubugtu/plugins/Mess/42.txt', '', False),
|
||||
'magic8ball': ('/home/dennis/ubugtu/plugins/Mess/ball.txt', '', False),
|
||||
'ferengi': ('/home/dennis/ubugtu/plugins/Mess/ferengi.txt', 'Ferengi rule of acquisition ', False)
|
||||
'bofh': ('/home/dennis/ubotu/plugins/Mess/bofh.txt', 'BOFH Excuse #%d: ', False),
|
||||
'42': ('/home/dennis/ubotu/plugins/Mess/42.txt', '', False),
|
||||
'magic8ball': ('/home/dennis/ubotu/plugins/Mess/ball.txt', '', False),
|
||||
'ferengi': ('/home/dennis/ubotu/plugins/Mess/ferengi.txt', 'Ferengi rule of acquisition ', False)
|
||||
}
|
||||
data = {}
|
||||
for m in mess.keys():
|
||||
@ -162,7 +162,7 @@ class Mess(callbacks.PluginRegexp):
|
||||
|
||||
@ok
|
||||
def hugme(self, irc, msg, match):
|
||||
r""".*hug.*ubugtu"""
|
||||
r""".*hug.*ubotu"""
|
||||
irc.queueMsg(ircmsgs.action(msg.args[0], self.hugs[random.randint(0,len(self.hugs)-1)] % msg.nick))
|
||||
|
||||
@ok
|
||||
|
@ -57,7 +57,7 @@ class Webcal(callbacks.Plugin):
|
||||
schedule.addPeriodicEvent(self._refresh_cache, 60 * 20, name=self.name())
|
||||
schedule.addPeriodicEvent(self._autotopics, 60, name=self.name() + 'b')
|
||||
self.cache = {}
|
||||
self.subs = shelve.open('/home/dennis/ubugtu/data/subscriptions.db')
|
||||
self.subs = shelve.open('/home/dennis/ubotu/data/subscriptions.db')
|
||||
|
||||
def die(self):
|
||||
schedule.removeEvent(self.name())
|
||||
|
Reference in New Issue
Block a user