Pārlūkot izejas kodu

lowercase command name

tags/v0.1
Ben Kurtovic pirms 13 gadiem
vecāks
revīzija
ddc9d9bf26
2 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      irc/commands/help.py
  2. +1
    -0
      irc/data.py

+ 1
- 1
irc/commands/help.py Parādīt failu

@@ -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 Parādīt failu

@@ -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

Notiek ielāde…
Atcelt
Saglabāt