mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 16:33:14 +02:00
Made channel mode +c block RGB color codes. Fixed a bug with channel alias{}'s where using the format syntax caused a crash.
This commit is contained in:
@@ -585,3 +585,6 @@
|
||||
- Added unreal_copyfileex() which works just like unreal_copyfile() but has an additional
|
||||
param to try hardlinks first.
|
||||
- Win32 crash fixes due to modulizing
|
||||
- Made channel mode +c block RGB color codes.
|
||||
- Fixed a bug with channel alias{}'s where using the format syntax caused a crash (#0002323)
|
||||
reported by Snake.
|
||||
|
||||
+9
-3
@@ -751,9 +751,15 @@ int can_send(aClient *cptr, aChannel *chptr, char *msgtext, int notice)
|
||||
}
|
||||
|
||||
if (chptr->mode.mode & MODE_NOCOLOR)
|
||||
if (strchr((char *)msgtext, 3) || strchr((char *)msgtext, 27))
|
||||
return (CANNOT_SEND_NOCOLOR);
|
||||
|
||||
{
|
||||
/* A bit faster */
|
||||
char *c;
|
||||
for (c = msgtext; *c; c++)
|
||||
{
|
||||
if (*c == 3 || *c == 27 || *c == 4)
|
||||
return (CANNOT_SEND_NOCOLOR);
|
||||
}
|
||||
}
|
||||
member = IsMember(cptr, chptr);
|
||||
if (chptr->mode.mode & MODE_NOPRIVMSGS && !member)
|
||||
return (CANNOT_SEND_NOPRIVMSGS);
|
||||
|
||||
+1
-1
@@ -392,7 +392,7 @@ int m_alias(aClient *cptr, aClient *sptr, int parc, char *parv[], char *cmd) {
|
||||
else if (format->type == ALIAS_CHANNEL)
|
||||
{
|
||||
aChannel *chptr;
|
||||
if ((chptr = find_channel(alias->nick, NULL)))
|
||||
if ((chptr = find_channel(format->nick, NULL)))
|
||||
{
|
||||
if (!can_send(sptr, chptr, parv[1], 0))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user