浏览代码

lowercase command name

tags/v0.1
Ben Kurtovic 13 年前
父节点
当前提交
ddc9d9bf26
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. +1
    -1
      irc/commands/help.py
  2. +1
    -0
      irc/data.py

+ 1
- 1
irc/commands/help.py 查看文件

@@ -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 查看文件

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

正在加载...
取消
保存