Przeglądaj źródła

Unicode fix for !dict and some stuff.

tags/v0.1^2
Ben Kurtovic 12 lat temu
rodzic
commit
fd2348ed1a
3 zmienionych plików z 18 dodań i 6 usunięć
  1. +2
    -1
      earwigbot/commands/dictionary.py
  2. +2
    -2
      earwigbot/commands/lag.py
  3. +14
    -3
      earwigbot/config.py

+ 2
- 1
earwigbot/commands/dictionary.py Wyświetl plik

@@ -103,7 +103,8 @@ class Dictionary(Command):
if body:
definition = self.parse_body(body[0])
if definition:
defs.append("\x02{0}\x0F {1}".format(part, definition))
msg = u"\x02{0}\x0F {1}"
defs.append(msg.format(part, definition))

return "; ".join(defs)



earwigbot/commands/replag.py → earwigbot/commands/lag.py Wyświetl plik

@@ -26,9 +26,9 @@ import oursql

from earwigbot.commands import Command

class Replag(Command):
class Lag(Command):
"""Return the replag for a specific database on the Toolserver."""
name = "replag"
name = "lag"

def setup(self):
try:

+ 14
- 3
earwigbot/config.py Wyświetl plik

@@ -26,9 +26,20 @@ import logging
import logging.handlers
from os import mkdir, path

from Crypto.Cipher import Blowfish
import bcrypt
import yaml
try:
from Crypto.Cipher import Blowfish
except ImportError:
Blowfish = None

try:
import bcrypt
except ImportError:
bcrypt = None

try:
import yaml
except ImportError:
yaml = None

from earwigbot.exceptions import NoConfigError



Ładowanie…
Anuluj
Zapisz