diff --git a/docs/notework.txt b/docs/notework.txt index 2d551be..49504e2 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -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. diff --git a/golded3/getpls.cpp b/golded3/getpls.cpp index e158cf6..fac36d4 100644 --- a/golded3/getpls.cpp +++ b/golded3/getpls.cpp @@ -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;