extern void do_wall(dbref player, const char *message, enum wall_type target,
int emit);
extern void do_page(dbref player, const char *arg1, const char *arg2,
- dbref cause, int noeval, int multipage, int override);
+ dbref cause, int noeval, int multipage, int override,
+ int has_eq);
extern void do_page_port(dbref player, const char *arg1, const char *arg2);
extern void do_think(dbref player, const char *message);
#define PEMIT_SILENT 0x1
COMMAND (cmd_page) {
char *t;
+ int has_eq = 0;
if ((arg_right) && (*arg_right)) {
t = arg_right;
} else {
t = NULL;
}
+ if (args_raw && *args_raw && strchr(args_raw, '='))
+ has_eq = 1;
if (SW_ISSET(sw, SWITCH_PORT))
do_page_port(player, arg_left, t);
else
do_page(player, arg_left, t, cause, SW_ISSET(sw, SWITCH_NOEVAL),
!(SW_ISSET(sw, SWITCH_BLIND) ||
(!(SW_ISSET(sw, SWITCH_LIST)) && (BLIND_PAGE))),
- SW_ISSET(sw, SWITCH_OVERRIDE));
+ SW_ISSET(sw, SWITCH_OVERRIDE), has_eq);
}
COMMAND (cmd_pose) {
* \param noeval if 1, page/noeval.
* \param multipage if 1, a page/list; if 0, a page/blind.
* \param override if 1, page/override.
+ * \param has_eq if 1, the command had an = in it.
*/
void
do_page(dbref player, const char *arg1, const char *arg2, dbref cause,
- int noeval, int multipage, int override)
+ int noeval, int multipage, int override, int has_eq)
{
dbref target;
const char *message;
if (!tbuf2)
mush_panic("Unable to allocate memory in do_page");
- if (arg2 && *arg2 && *arg1) {
- /* page to=msg. Always evaluate to, maybe evaluate msg */
+ if (*arg1 && has_eq) {
+ /* page to=[msg]. Always evaluate to, maybe evaluate msg */
process_expression(tbuf2, &tp2, &arg1, player, cause, cause,
PE_DEFAULT, PT_DEFAULT, NULL);
*tp2 = '\0';