Added @notforward template token

This commit is contained in:
Alexander S. Aganichev 2002-08-07 07:28:25 +00:00
parent 53d11a6bce
commit 4907888eb7
2 changed files with 12 additions and 0 deletions

View File

@ -12,6 +12,10 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
+ Added patch by Vladimir V. Korablin for @notforward template token.
The line containing this token is left only when message IS NOT
a forward. This is "@forward"'s counterpart.
! If two AreaSep have the same echotag then they will appear only
once.

View File

@ -89,6 +89,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
enum TPL_TOKEN_IDS {
TPLTOKEN_FORWARD,
TPLTOKEN_NOTFORWARD,
TPLTOKEN_CHANGED,
TPLTOKEN_NET,
TPLTOKEN_ECHO,
@ -127,6 +128,7 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
static const tpl_token token_list[] = {
{ CSTR_COMMA_SIZEOF_CSTR("forward") },
{ CSTR_COMMA_SIZEOF_CSTR("notforward") },
{ CSTR_COMMA_SIZEOF_CSTR("changed") },
{ CSTR_COMMA_SIZEOF_CSTR("net") },
{ CSTR_COMMA_SIZEOF_CSTR("echo") },
@ -348,6 +350,12 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
token = end_token;
break;
case TPLTOKEN_NOTFORWARD:
if(mode == MODE_FORWARD)
goto loop_next;
token = end_token;
break;
case TPLTOKEN_CHANGED:
if(mode != MODE_CHANGE)
goto loop_next;