New template tokens: @echopath, @echoname, @echotype
This commit is contained in:
parent
d799a4d70a
commit
4280e1d7ba
@ -10,7 +10,13 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
+ Golded+/lnx: Adopt clipboard to newest versions of Midnight Commander.
|
||||
+ New macros in message template for echomail messages:
|
||||
@echopath - path to echoarea base (fill pathname like specified in config),
|
||||
@echoname - echoarea name (areatag),
|
||||
@echotype - echoarea base type (OPUS, JAM, Squish, PCBoard, ...).
|
||||
(Patch from Ianos Gnatiuc 2:5030/830.17)
|
||||
|
||||
+ Golded+/lnx: Adopt clipboard usage to newest versions of Midnight Commander.
|
||||
|
||||
+ Display originator's city in delimiter line between header and message body.
|
||||
New config file token: DISPHDRLOCATION (yes/no).
|
||||
|
@ -385,6 +385,41 @@ char* TokenXlat(int mode, char* input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
if(tokenxchg(dst, "@origin",
|
||||
HandleRandomLine(strxcpy(buf, AA->Origin(), sizeof(buf)), sizeof(buf))))
|
||||
continue;
|
||||
|
||||
if (strnieql(dst, "@echo", 5))
|
||||
{
|
||||
if (tokenxchg(dst, "@echotype", AA->basetype()))
|
||||
continue;
|
||||
|
||||
char echopath[GMAXPATH];
|
||||
char echoname[GMAXPATH];
|
||||
|
||||
strcpy(echopath, AA->path());
|
||||
echoname[0] = NUL;
|
||||
|
||||
size_t slashpos;
|
||||
size_t pathlen = strlen(echopath);
|
||||
|
||||
for (slashpos = pathlen-1; slashpos < pathlen; slashpos--)
|
||||
if (isslash(echopath[slashpos])) break;
|
||||
|
||||
if (slashpos < pathlen)
|
||||
{
|
||||
strcpy(echoname, &echopath[slashpos+1]);
|
||||
echopath[slashpos+1] = NUL;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(echoname, echopath);
|
||||
echopath[0] = NUL;
|
||||
}
|
||||
|
||||
if (tokenxchg(dst, "@echopath", echopath))
|
||||
continue;
|
||||
if (tokenxchg(dst, "@echoname", echoname))
|
||||
continue;
|
||||
}
|
||||
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -6057,6 +6057,11 @@ The following is a list of the tokens available:
|
||||
@dlname Destination last name.
|
||||
@dname Destination name.
|
||||
@dpseudo Destination pseudonym (see addressbook), or @dfname.
|
||||
@echopath path to echoarea base (fill pathname like specified in config),
|
||||
this token is valid for echoareas only.
|
||||
@echoname echoarea name (areatag), this token is valid for echoareas only.
|
||||
@echotype echoarea base type (OPUS, JAM, Squish, PCBoard, ...), this token
|
||||
is valid for echoareas only.
|
||||
@f3daddr Current from 3D (boss) address.
|
||||
@faddr Current from address.
|
||||
@ffname Current from first name.
|
||||
|
Reference in New Issue
Block a user