Adding a check to prevent duplicate channel names.

This commit is contained in:
Greg Taylor 2007-05-15 14:18:56 +00:00
parent 463197470e
commit 725b1b2ac0
2 changed files with 19 additions and 1 deletions

View file

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