mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 06:23:13 +02:00
Made CmodeAdd return MODERR_EXISTS if the mode already exists
This commit is contained in:
@@ -2699,3 +2699,4 @@ seen. gmtime warning still there
|
||||
- Fixed a compile problem reported by ace (#0001474)
|
||||
- Added an EXTBAN 005 token (see doc/technical/005.txt for info)
|
||||
- Fixed a bug with the dynamic umode and cmode systems
|
||||
- Made CmodeAdd return MODERR_EXISTS if the mode already exists
|
||||
|
||||
@@ -120,6 +120,12 @@ Cmode *CmodeAdd(Module *reserved, CmodeInfo req, Cmode_t *mode)
|
||||
{
|
||||
if (!Channelmode_Table[i].flag)
|
||||
break;
|
||||
else if (Channelmode_Table[i].flag == req.flag)
|
||||
{
|
||||
if (reserved)
|
||||
reserved->errorcode = MODERR_EXISTS;
|
||||
return NULL;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (i == EXTCMODETABLESZ)
|
||||
|
||||
Reference in New Issue
Block a user