Changed so that channel names can use any case. Resolves #814.
This commit is contained in:
parent
90c6ade56d
commit
c191996975
1 changed files with 3 additions and 5 deletions
|
|
@ -519,17 +519,15 @@ class CmdChannelCreate(MuxPlayerCommand):
|
||||||
channame = lhs
|
channame = lhs
|
||||||
aliases = None
|
aliases = None
|
||||||
if ';' in lhs:
|
if ';' in lhs:
|
||||||
channame, aliases = [part.strip().lower()
|
channame, aliases = lhs.split(';', 1)
|
||||||
for part in lhs.split(';', 1) if part.strip()]
|
aliases = [alias.strip().lower() for alias in aliases.split(';')]
|
||||||
aliases = [alias.strip().lower()
|
|
||||||
for alias in aliases.split(';') if alias.strip()]
|
|
||||||
channel = ChannelDB.objects.channel_search(channame)
|
channel = ChannelDB.objects.channel_search(channame)
|
||||||
if channel:
|
if channel:
|
||||||
self.msg("A channel with that name already exists.")
|
self.msg("A channel with that name already exists.")
|
||||||
return
|
return
|
||||||
# Create and set the channel up
|
# Create and set the channel up
|
||||||
lockstring = "send:all();listen:all();control:id(%s)" % caller.id
|
lockstring = "send:all();listen:all();control:id(%s)" % caller.id
|
||||||
new_chan = create.create_channel(channame,
|
new_chan = create.create_channel(channame.strip(),
|
||||||
aliases,
|
aliases,
|
||||||
description,
|
description,
|
||||||
locks=lockstring)
|
locks=lockstring)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue