Adding a check to prevent duplicate channel names.
This commit is contained in:
parent
463197470e
commit
725b1b2ac0
2 changed files with 19 additions and 1 deletions
|
|
@ -139,6 +139,12 @@ def cmd_ccreate(cdat):
|
|||
|
||||
if cname == '':
|
||||
session.msg("You must supply a name!")
|
||||
return
|
||||
|
||||
name_matches = functions_comsys.cname_search(cname, exact=True)
|
||||
|
||||
if name_matches:
|
||||
session.msg("A channel with that name already exists.")
|
||||
else:
|
||||
# Create and set the object up.
|
||||
cdat = {"name": cname, "owner": pobject}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue