Disallow '$' in forward targets only, rather than all channel names.

This commit is contained in:
Jilles Tjoelker 2011-12-11 16:56:37 +01:00
parent e238d01db9
commit f2edb2be59
2 changed files with 6 additions and 1 deletions

View file

@ -882,6 +882,11 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
return;
if(!check_forward(source_p, chptr, forward))
return;
/* For simplicity and future flexibility, do not
* allow '$' in forwarding targets.
*/
if(strchr(forward, '$') != NULL)
return;
/* Forwards only make sense for bans. */
if(mode_type != CHFL_BAN)
return;

View file

@ -691,7 +691,7 @@ const unsigned int CharAttrs[] = {
/* ! */ PRINT_C | KWILD_C | CHAN_C | NONEOS_C,
/* " */ PRINT_C | CHAN_C | NONEOS_C,
/* # */ PRINT_C | MWILD_C | CHANPFX_C | CHAN_C | NONEOS_C,
/* $ */ PRINT_C | NONEOS_C,
/* $ */ PRINT_C | CHAN_C | NONEOS_C,
/* % */ PRINT_C | CHAN_C | NONEOS_C,
/* & */ PRINT_C | CHANPFX_C | CHAN_C | NONEOS_C,
/* ' */ PRINT_C | CHAN_C | NONEOS_C,