Ver código fonte

lowercase command name

tags/v0.1
Ben Kurtovic 13 anos atrás
pai
commit
ddc9d9bf26
2 arquivos alterados com 2 adições e 1 exclusões
  1. +1
    -1
      irc/commands/help.py
  2. +1
    -0
      irc/data.py

+ 1
- 1
irc/commands/help.py Ver arquivo

@@ -41,7 +41,7 @@ class Help(BaseCommand):
commands = command_handler.get_commands()

dummy = Data() # dummy message to test which command classes pick up this command
dummy.command = command
dummy.command = command.lower() # lowercase command name
dummy.is_command = True

for cmnd in commands:


+ 1
- 0
irc/data.py Ver arquivo

@@ -29,5 +29,6 @@ class Data(object):
if self.command.startswith('!') or self.command.startswith('.'):
self.is_command = True
self.command = self.command[1:] # strip '!' or '.'
self.command = self.command.lower() # lowercase command name
except AttributeError:
pass

Carregando…
Cancelar
Salvar