fixed slash at begin of line

This commit is contained in:
wowaname 2016-08-03 00:59:18 +00:00
parent 8bf7673e19
commit d4e8cc830c

View File

@ -110,8 +110,8 @@ def cb_embellish(data, mod, buf, input):
if not input:
return input
if input != "/" and input.startswith("/") and input.split(" ",
1)[0].split("\n", 1)[0].find("/", 1) < 0:
if (input.startswith("/") and not input.startswith("/ ") and input != "/"
and input.split(" ", 1)[0].split("\n", 1)[0].find("/", 1) < 0):
for cmd in weechat.config_get_plugin("whitelist_cmds").lower().split(","):
if not input.startswith("/%s " % cmd): continue
output = "/%s " % cmd