Example #1
0
void
do_wall(dbref player, const char *message)
{
    char buf[BUFFER_LEN];

    if ((Mage(player) || (POWERS(player) & POW_ANNOUNCE))
        && Typeof(player) == TYPE_PLAYER) {
        if (!*message) {
            anotify_nolisten2(player, CINFO "Shout what?");
            return;
        }
        switch (message[0]) {
            case ':':
            case ';':
                sprintf(buf, SYSWHITE MARK SYSNORMAL "%s %s", NAME(player),
                        message + 1);
                break;
            case '#':
            case '|':
                sprintf(buf, SYSWHITE MARK SYSNORMAL "%s", message + 1);
                break;
            default:
                sprintf(buf, SYSWHITE MARK SYSNORMAL "%s shouts, \"%s\"",
                        NAME(player), message);
        }
        wall_all(buf);
        /* log_status("WALL: %s(%d): %s\n", NAME(player), player, buf); */
    } else {
        anotify_fmt(player, CFAIL "%s", tp_noperm_mesg);
    }
}
Example #2
0
void 
do_wall(dbref player, const char *message)
{
    char    buf[BUFFER_LEN];

    if (Mage(player) && Typeof(player) == TYPE_PLAYER) {
	switch(message[0]) {
	    case ':':
	    case ';':
		sprintf(buf, MARK "%s %.3900s", NAME(player), message+1);
		break;
	    case '@':
		sprintf(buf, MARK "%.3900s", message+1);
		break;
	    case '\0':
	    case '#':
		notify(player, "@wall help");
		notify(player, "~~~~~");
		notify(player, "@wall message  -- Show all players 'message'");
		notify(player, "@wall :message -- Pose message to all players");
		notify(player, "@wall @message -- Spoof message to all players");
		notify(player, "@wall #        -- Show this help list");
		return;
	    default:
		sprintf(buf, MARK "%s shouts, \"%.3900s\"", NAME(player), message);
	}
	wall_all( buf );
	/* log_status("WALL: %s: %.3900s\n", unparse_object(MAN, player), buf); */
    } else {
	anotify(player, CFAIL NOPERM_MESG);
    }
}