Minor bug fixes.

master
Sean B. Palmer 2008-12-28 09:42:48 +00:00
parent d26fc8d81f
commit f9aff27534
4 changed files with 16 additions and 6 deletions

View File

@ -135,7 +135,7 @@ TZ2 = {
'HST': 10,
'IDLE': -12,
'IDLW': 12,
'IST': -5.5,
# 'IST': -5.5,
'IT': -3.5,
'JST': -9,
'JT': -7,
@ -181,8 +181,14 @@ TZ2 = {
'ZP6': -6
}
TimeZones.update(TZ2)
TZ3 = {
'AEST': 10,
'AEDT': 11
}
# TimeZones.update(TZ2) # do these have to be negated?
TimeZones.update(TZ1)
TimeZones.update(TZ3)
@deprecated
def f_time(self, origin, match, args):

View File

@ -22,7 +22,7 @@ abbrs = [
'cf', 'lit', 'etc', 'Ger', 'Du', 'Skt', 'Rus', 'Eng', 'Amer.Eng', 'Sp',
'Fr', 'N', 'E', 'S', 'W', 'L', 'Gen', 'J.C', 'dial', 'Gk',
'19c', '18c', '17c', '16c', 'St', 'Capt', 'obs', 'Jan', 'Feb', 'Mar',
'Apr', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'c'
'Apr', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'c', 'tr'
]
t_sentence = r'^.*?(?<!%s)(?:\.(?= [A-Z0-9]|\Z)|\Z)'
r_sentence = re.compile(t_sentence % ')(?<!'.join(abbrs))

View File

@ -53,9 +53,13 @@ def o(phenny, input):
else: command, args = text, ''
command = command.lower()
if command == 'service':
msg = o.services.get(args, 'No such service!')
return phenny.reply(msg)
if o.services.has_key(command):
template = o.services[command]
template = template.replace('${args}', urllib.quote(args.encode('utf-8')))
t = o.services[command]
template = t.replace('${args}', urllib.quote(args.encode('utf-8')))
template = template.replace('${nick}', urllib.quote(input.nick))
uri = template.replace('${sender}', urllib.quote(input.sender))

View File

@ -24,7 +24,7 @@ r_redirect = re.compile(
abbrs = ['etc', 'ca', 'cf', 'Co', 'Ltd', 'Inc', 'Mt', 'Mr', 'Mrs',
'Dr', 'Ms', 'Rev', 'Fr', 'St', 'Sgt', 'pron', 'approx', 'lit',
'syn', 'transl', 'sess', 'fl'] \
'syn', 'transl', 'sess', 'fl', 'Op'] \
+ list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') \
+ list('abcdefghijklmnopqrstuvwxyz')
t_sentence = r'^.{5,}?(?<!\b%s)(?:\.(?= [A-Z0-9]|\Z)|\Z)'