diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-14 19:22:04 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:50 +0000 |
commit | 98abaa24e6ba46aaa44a0d458a0f4f2208ace21d (patch) | |
tree | 08abc66855538bf031036a91fdd28377886a5a4b | |
parent | 7615d380395b6bfc33a8819810433ebf94990a09 (diff) |
* (bug 4306) Fix display formatting between different types of chat text
* Support parsing /say_area out of /say
* General cleanups/refactors to messaging code
-rw-r--r-- | src/cgame/cg_servercmds.c | 142 | ||||
-rw-r--r-- | src/game/g_cmds.c | 154 | ||||
-rw-r--r-- | src/game/g_local.h | 4 | ||||
-rw-r--r-- | src/game/g_main.c | 23 | ||||
-rw-r--r-- | src/game/g_svcmds.c | 15 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 12 |
6 files changed, 178 insertions, 172 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index cd590c40..fb290db3 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -912,56 +912,39 @@ void CG_Menu( int menu, int arg ) CG_Say ================= */ -static void CG_Say( int clientNum, const char *text ) +static void CG_Say( int clientNum, saymode_t mode, const char *text ) { clientInfo_t *ci; - char sayText[ MAX_STRING_CHARS ]; char *prefix, *name; + qboolean isIgnored = qfalse; + char *location = ""; + char tcolor = COLOR_WHITE; + char color; if( clientNum >= 0 && clientNum < MAX_CLIENTS ) ci = &cgs.clientinfo[ clientNum ]; else ci = NULL; - if( ci && cg_chatTeamPrefix.integer ) - prefix = va( "[%c] ", toupper( *( BG_TeamName( ci->team ) ) ) ); - else - prefix = ""; if( ci ) + { name = ci->name; + if( ci->team == TEAM_ALIENS ) + tcolor = COLOR_RED; + else if( ci->team == TEAM_HUMANS ) + tcolor = COLOR_CYAN; + } else name = "console"; - Com_sprintf( sayText, sizeof( sayText ), "%s%s: " S_COLOR_GREEN "%s\n", - prefix, name, text ); - - if( ci && ( cg_teamChatsOnly.integer || - Com_ClientListContains( &cgs.ignoreList, clientNum ) ) ) - CG_Printf( "[skipnotify]%s", sayText ); - else - { - CG_Printf( "%s", sayText ); - trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); - } -} - -/* -================= -CG_SayTeam -================= -*/ -static void CG_SayTeam( int clientNum, const char *text ) -{ - clientInfo_t *ci; - char sayText[ MAX_STRING_CHARS ]; - char *location = "", *name; - - if( clientNum >= 0 && clientNum < MAX_CLIENTS ) - ci = &cgs.clientinfo[ clientNum ]; + if( ci && cg_chatTeamPrefix.integer ) + prefix = va( "^%c[%c] " S_COLOR_WHITE, + tcolor, toupper( *( BG_TeamName( ci->team ) ) ) ); else - ci = NULL; + prefix = ""; + if( mode == SAY_TEAM || mode == SAY_AREA ) // don't always use "unknown" if( ci && ci->location > 0 && ci->location < MAX_LOCATIONS ) { @@ -970,23 +953,68 @@ static void CG_SayTeam( int clientNum, const char *text ) location = va( " (%s" S_COLOR_WHITE ")", s ); } - if( ci ) - name = ci->name; - else - name = "console"; + if( ci && Com_ClientListContains( &cgs.ignoreList, clientNum ) ) + isIgnored = qtrue; - Com_sprintf( sayText, sizeof( sayText ), "%s%s: " S_COLOR_CYAN "%s\n", - name, location, text ); + switch( mode ) + { + case SAY_ALL: + if( isIgnored || ( ci && cg_teamChatsOnly.integer ) ) + CG_Printf( "[skipnotify]%s%s: " S_COLOR_GREEN "%s\n", + prefix, name, text ); + else + CG_Printf( "%s%s: " S_COLOR_GREEN "%s\n", prefix, name, text ); + break; + case SAY_TEAM: + CG_Printf( "%s(%s)%s: " S_COLOR_CYAN "%s\n", + prefix, name, location, text ); + break; + case SAY_ADMINS: + CG_Printf( "%s[ADMIN]%s: " S_COLOR_MAGENTA "%s\n", prefix, name, text ); + break; + case SAY_ADMINS_PUBLIC: + CG_Printf( "%s[PLAYER]%s: " S_COLOR_MAGENTA "%s\n", prefix, name, text ); + break; + case SAY_AREA: + CG_Printf( "%s<%s>: " S_COLOR_BLUE "%s\n", prefix, name, text ); + break; + case SAY_PRIVMSG: + case SAY_TPRIVMSG: + color = ( mode == SAY_TPRIVMSG ) ? COLOR_CYAN : COLOR_GREEN; + if( isIgnored ) + CG_Printf( "[skipnotify]%s" S_COLOR_YELLOW " -> " S_COLOR_WHITE "%s: " + "^%c%s\n", name, cgs.clientinfo[ cg.clientNum ].name, color, + text ); + else + { + CG_Printf( "%s" S_COLOR_YELLOW " -> " S_COLOR_WHITE "%s: ^%c%s\n", + name, cgs.clientinfo[ cg.clientNum ].name, color, text ); + CG_CenterPrint( va( "^%cPrivate message from: " S_COLOR_WHITE "%s", + color, name ), 200, GIANTCHAR_WIDTH * 4 ); + } + break; + case SAY_RAW: + CG_Printf( "%s\n", text ); + break; + } - if( ci && Com_ClientListContains( &cgs.ignoreList, clientNum ) ) - CG_Printf( "[skipnotify]%s", sayText ); - else + switch( mode ) { - CG_Printf( "%s", sayText ); - if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) - trap_S_StartLocalSound( cgs.media.alienTalkSound, CHAN_LOCAL_SOUND ); - else if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) - trap_S_StartLocalSound( cgs.media.humanTalkSound, CHAN_LOCAL_SOUND ); + case SAY_TEAM: + case SAY_AREA: + case SAY_TPRIVMSG: + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) + { + trap_S_StartLocalSound( cgs.media.alienTalkSound, CHAN_LOCAL_SOUND ); + break; + } + else if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) + { + trap_S_StartLocalSound( cgs.media.humanTalkSound, CHAN_LOCAL_SOUND ); + break; + } + default: + trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); } } @@ -1088,10 +1116,10 @@ static void CG_ParseVoice( void ) switch( vChan ) { case VOICE_CHAN_ALL: - CG_Say( clientNum, sayText ); + CG_Say( clientNum, SAY_ALL, sayText ); break; case VOICE_CHAN_TEAM: - CG_SayTeam( clientNum, sayText ); + CG_Say( clientNum, SAY_TEAM, sayText ); break; default: break; @@ -1153,18 +1181,13 @@ CG_Chat_f */ static void CG_Chat_f( void ) { - char cmd[ 6 ]; - qboolean team; - - trap_Argv( 0, cmd, sizeof( cmd ) ); - team = Q_stricmp( cmd, "chat" ); + char id[ 3 ]; + char mode[ 3 ]; - trap_Argv( 1, cmd, sizeof( cmd ) ); + trap_Argv( 1, id, sizeof( id ) ); + trap_Argv( 2, mode, sizeof( mode ) ); - if( team ) - CG_SayTeam( atoi( cmd ), CG_Argv( 2 ) ); - else - CG_Say( atoi( cmd ), CG_Argv( 2 ) ); + CG_Say( atoi( id ), atoi( mode ), CG_Argv( 3 ) ); } /* @@ -1257,7 +1280,6 @@ static consoleCommand_t svcommands[ ] = { "cs", CG_ConfigStringModified }, { "print", CG_Print_f }, { "chat", CG_Chat_f }, - { "tchat", CG_Chat_f }, { "scores", CG_ParseScores }, { "tinfo", CG_ParseTeamInfo }, { "map_restart", CG_MapRestart }, diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index e82a7b56..33a572be 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -664,38 +664,40 @@ void Cmd_Team_f( gentity_t *ent ) G_Say ================== */ -static void G_SayTo( gentity_t *ent, gentity_t *other, int mode, const char *message ) +static qboolean G_SayTo( gentity_t *ent, gentity_t *other, saymode_t mode, const char *message ) { if( !other ) - return; + return qfalse; if( !other->inuse ) - return; + return qfalse; if( !other->client ) - return; + return qfalse; if( other->client->pers.connected != CON_CONNECTED ) - return; + return qfalse; - if( mode == SAY_TEAM && !OnSameTeam( ent, other ) ) + if( ( ent && !OnSameTeam( ent, other ) ) && + ( mode == SAY_TEAM || mode == SAY_AREA || mode == SAY_TPRIVMSG ) ) { if( other->client->pers.teamSelection != TEAM_NONE ) - return; - - if( !G_admin_permission( other, ADMF_SPEC_ALLCHAT ) ) - return; + return qfalse; // specs with ADMF_SPEC_ALLCHAT flag can see team chat + if( !G_admin_permission( other, ADMF_SPEC_ALLCHAT ) && mode != SAY_TPRIVMSG ) + return qfalse; } - trap_SendServerCommand( other-g_entities, va( "%s %d \"%s\"", - mode == SAY_TEAM ? "tchat" : "chat", + trap_SendServerCommand( other-g_entities, va( "chat %d %d\"%s\"", ent ? ent-g_entities : -1, + mode, message ) ); + + return qtrue; } -void G_Say( gentity_t *ent, int mode, const char *chatText ) +void G_Say( gentity_t *ent, saymode_t mode, const char *chatText ) { int j; gentity_t *other; @@ -714,21 +716,24 @@ void G_Say( gentity_t *ent, int mode, const char *chatText ) switch( mode ) { - default: case SAY_ALL: G_LogPrintf( "Say: %d \"%s" S_COLOR_WHITE "\": " S_COLOR_GREEN "%s\n", ( ent ) ? ent - g_entities : -1, ( ent ) ? ent->client->pers.netname : "console", chatText ); break; - case SAY_TEAM: // console say_team is handled in g_svscmds, not here if( !ent || !ent->client ) Com_Error( ERR_FATAL, "SAY_TEAM by non-client entity\n" ); - G_LogPrintf( "SayTeam: %d \"%s" S_COLOR_WHITE "\": " S_COLOR_CYAN "%s\n", ent - g_entities, ent->client->pers.netname, chatText ); break; + case SAY_RAW: + if( ent ) + Com_Error( ERR_FATAL, "SAY_RAW by client entity\n" ); + G_LogPrintf( "Chat: -1 \"console\": %s\n", chatText ); + default: + break; } Q_strncpyz( text, chatText, sizeof( text ) ); @@ -752,7 +757,30 @@ static void Cmd_SayArea_f( gentity_t *ent ) int num, i; vec3_t range = { 1000.0f, 1000.0f, 1000.0f }; vec3_t mins, maxs; - char *msg = ConcatArgs( 1 ); + char *msg; + char cmd[ sizeof( "say_team" ) ]; + int skiparg = 0; + + if( ent->client->pers.teamSelection == TEAM_NONE ) + { + G_TriggerMenu( ent->client->ps.clientNum, MN_CMD_TEAM ); + return; + } + + // Skip say/say_team if this was used from one of those + G_SayArgv( 0, cmd, sizeof( cmd ) ); + if( !Q_stricmp( cmd, "say" ) || !Q_stricmp( cmd, "say_team" ) ) + { + skiparg = 1; + G_SayArgv( 1, cmd, sizeof( cmd ) ); + } + if( G_SayArgc( ) < 2 + skiparg ) + { + ADMP( va( "usage: %s [message]\n", cmd ) ); + return; + } + + msg = G_SayConcatArgs( 1 + skiparg ); for(i = 0; i < 3; i++ ) range[ i ] = g_sayAreaRange.value; @@ -765,7 +793,7 @@ static void Cmd_SayArea_f( gentity_t *ent ) num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES ); for( i = 0; i < num; i++ ) - G_SayTo( ent, &g_entities[ entityList[ i ] ], SAY_TEAM, msg ); + G_SayTo( ent, &g_entities[ entityList[ i ] ], SAY_AREA, msg ); //Send to ADMF_SPEC_ALLCHAT candidates for( i = 0; i < level.maxclients; i++ ) @@ -773,7 +801,7 @@ static void Cmd_SayArea_f( gentity_t *ent ) if( g_entities[ i ].client->pers.teamSelection == TEAM_NONE && G_admin_permission( &g_entities[ i ], ADMF_SPEC_ALLCHAT ) ) { - G_SayTo( ent, &g_entities[ i ], SAY_TEAM, msg ); + G_SayTo( ent, &g_entities[ i ], SAY_AREA, msg ); } } } @@ -788,7 +816,7 @@ static void Cmd_Say_f( gentity_t *ent ) { char *p; char *args; - int mode = SAY_ALL; + saymode_t mode = SAY_ALL; args = G_SayConcatArgs( 0 ); if( Q_stricmpn( args, "say_team ", 9 ) == 0 ) @@ -813,6 +841,14 @@ static void Cmd_Say_f( gentity_t *ent ) return; } + // support parsing /say_area out of say text for the same reason + if( !Q_stricmpn( args, "say /say_area ", 14 ) || + !Q_stricmpn( args, "say_team /say_area ", 19 ) ) + { + Cmd_SayArea_f( ent ); + return; + } + if( trap_Argc( ) < 2 ) return; @@ -3073,17 +3109,15 @@ void G_DecolorString( char *in, char *out, int len ) void Cmd_PrivateMessage_f( gentity_t *ent ) { int pids[ MAX_CLIENTS ]; - int ignoreids[ MAX_CLIENTS ]; char name[ MAX_NAME_LENGTH ]; char cmd[ 12 ]; char str[ MAX_STRING_CHARS ]; char *msg; char color; - int pcount, matches, ignored = 0; - int i; + int i, pcount; int skipargs = 0; + int count = 0; qboolean teamonly = qfalse; - gentity_t *tmpent; if( !g_privateMessages.integer && ent ) { @@ -3091,6 +3125,7 @@ void Cmd_PrivateMessage_f( gentity_t *ent ) return; } + // parse arguments G_SayArgv( 0, cmd, sizeof( cmd ) ); if( !Q_stricmp( cmd, "say" ) || !Q_stricmp( cmd, "say_team" ) ) { @@ -3106,57 +3141,24 @@ void Cmd_PrivateMessage_f( gentity_t *ent ) if( !Q_stricmp( cmd, "mt" ) || !Q_stricmp( cmd, "/mt" ) ) teamonly = qtrue; + // figure out the name matches G_SayArgv( 1+skipargs, name, sizeof( name ) ); msg = G_SayConcatArgs( 2+skipargs ); pcount = G_ClientNumbersFromString( name, pids, MAX_CLIENTS ); - if( ent ) - { - int count = 0; - - for( i = 0; i < pcount; i++ ) - { - tmpent = &g_entities[ pids[ i ] ]; - - if( teamonly && !OnSameTeam( ent, tmpent ) ) - continue; - - if( Com_ClientListContains( &tmpent->client->sess.ignoreList, - ent-g_entities ) ) - { - ignoreids[ ignored++ ] = pids[ i ]; - continue; - } - - pids[ count ] = pids[ i ]; + // send the message + for( i = 0; i < pcount; i++ ) + if( G_SayTo( ent, &g_entities[ pids[ i ] ], + teamonly ? SAY_TPRIVMSG : SAY_PRIVMSG, msg ) ) count++; - } - matches = count; - } - else - { - matches = pcount; - } + // report the results color = teamonly ? COLOR_CYAN : COLOR_YELLOW; - Com_sprintf( str, sizeof( str ), "^%csent to %i player%s: ^7", color, matches, - ( matches == 1 ) ? "" : "s" ); - - for( i=0; i < matches; i++ ) - { - tmpent = &g_entities[ pids[ i ] ]; + Com_sprintf( str, sizeof( str ), "^%csent to %i player%s", color, count, + ( count == 1 ) ? "" : "s" ); - if( i > 0 ) - Q_strcat( str, sizeof( str ), "^7, " ); - Q_strcat( str, sizeof( str ), tmpent->client->pers.netname ); - G_SayTo( ent, tmpent, teamonly ? SAY_TEAM : SAY_ALL, msg ); - trap_SendServerCommand( pids[ i ], va( - "cp \"^%cprivate message from ^7%s^7\"", color, - ( ent ) ? ent->client->pers.netname : "console" ) ); - } - - if( !matches ) + if( !count ) ADMP( va( "^3No player matching ^7\'%s^7\' ^3to send message to.\n", name ) ); else @@ -3164,25 +3166,11 @@ void Cmd_PrivateMessage_f( gentity_t *ent ) ADMP( va( "^%cPrivate message: ^7%s\n", color, msg ) ); ADMP( va( "%s\n", str ) ); - G_LogPrintf( "%s: %d \"%s" S_COLOR_WHITE "\" \"%s\": %s\n", + G_LogPrintf( "%s: %d \"%s" S_COLOR_WHITE "\" \"%s\": ^%c%s\n", ( teamonly ) ? "TPrivMsg" : "PrivMsg", ( ent ) ? ent - g_entities : -1, ( ent ) ? ent->client->pers.netname : "console", - name, msg ); - } - - if( ignored ) - { - Com_sprintf( str, sizeof( str ), "^%cignored by %i player%s: ^7", color, - ignored, ( ignored == 1 ) ? "" : "s" ); - for( i=0; i < ignored; i++ ) - { - tmpent = &g_entities[ ignoreids[ i ] ]; - if( i > 0 ) - Q_strcat( str, sizeof( str ), "^7, " ); - Q_strcat( str, sizeof( str ), tmpent->client->pers.netname ); - } - ADMP( va( "%s\n", str ) ); + name, color, msg ); } } @@ -3226,6 +3214,6 @@ void Cmd_AdminMessage_f( gentity_t *ent ) return; } - G_AdminMessage( ent, "%s", G_SayConcatArgs( 1 + skiparg ) ); + G_AdminMessage( ent, G_SayConcatArgs( 1 + skiparg ) ); } diff --git a/src/game/g_local.h b/src/game/g_local.h index f8c141ec..fea41a47 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -678,7 +678,7 @@ void G_ToggleFollow( gentity_t *ent ); void G_MatchOnePlayer( int *plist, int num, char *err, int len ); int G_ClientNumberFromString( char *s ); int G_ClientNumbersFromString( char *s, int *plist, int max ); -void G_Say( gentity_t *ent, int mode, const char *chatText ); +void G_Say( gentity_t *ent, saymode_t mode, const char *chatText ); int G_SayArgc( void ); qboolean G_SayArgv( int n, char *buffer, int bufferLength ); char *G_SayConcatArgs( int start ); @@ -953,7 +953,7 @@ void G_MapConfigs( const char *mapname ); void CalculateRanks( void ); void FindIntermissionPoint( void ); void G_RunThink( gentity_t *ent ); -void QDECL G_AdminMessage( gentity_t *ent, const char *fmt, ... ); +void G_AdminMessage( gentity_t *ent, const char *string ); void QDECL G_LogPrintf( const char *fmt, ... ); void SendScoreboardMessageToAllClients( void ); void QDECL G_Printf( const char *fmt, ... ); diff --git a/src/game/g_main.c b/src/game/g_main.c index 7f104a15..f8740dcb 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1628,25 +1628,17 @@ void ExitLevel( void ) G_AdminMessage Print to all active server admins, and to the logfile, and to the server console -Prepend *prefix, or '[SERVER]' if no *prefix is given ================= */ -void QDECL G_AdminMessage( gentity_t *ent, const char *fmt, ... ) +void G_AdminMessage( gentity_t *ent, const char *msg ) { - va_list argptr; char string[ 1024 ]; - char outstring[ 1024 ] = S_COLOR_MAGENTA; int i; - // Format the text - va_start( argptr, fmt ); - Q_vsnprintf( string, sizeof( string ), fmt, argptr ); - va_end( argptr ); - - // Create the final string - Q_strcat( outstring, sizeof( outstring ), string ); - Com_sprintf( string, sizeof( string ), "chat %d \"%s\"", - ent ? ent - g_entities : -1, outstring ); + Com_sprintf( string, sizeof( string ), "chat %d %d \"" S_COLOR_MAGENTA "%s\"", + ent ? ent - g_entities : -1, + G_admin_permission( ent, ADMF_ADMINCHAT ) ? SAY_ADMINS : SAY_ADMINS_PUBLIC, + msg ); // Send to all appropriate clients for( i = 0; i < level.maxclients; i++ ) @@ -1654,9 +1646,10 @@ void QDECL G_AdminMessage( gentity_t *ent, const char *fmt, ... ) trap_SendServerCommand( i, string ); // Send to the logfile and server console - G_LogPrintf( "AdminMsg: %d \"%s" S_COLOR_WHITE "\": %s\n", + G_LogPrintf( "%s: %d \"%s" S_COLOR_WHITE "\": " S_COLOR_MAGENTA "%s\n", + G_admin_permission( ent, ADMF_ADMINCHAT ) ? "AdminMsg" : "AdminMsgPublic", ent ? ent - g_entities : -1, ent ? ent->client->pers.netname : "console", - outstring ); + msg ); } diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index 275db7b6..755948b5 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -371,7 +371,7 @@ static void Svcmd_TeamMessage_f( void ) return; } - G_TeamCommand( team, va( "tchat -1 \"%s\"", ConcatArgs( 2 ) ) ); + G_TeamCommand( team, va( "chat -1 %d \"%s\"", SAY_TEAM, ConcatArgs( 2 ) ) ); G_LogPrintf( "SayTeam: -1 \"console\": %s\n", ConcatArgs( 2 ) ); } @@ -484,14 +484,7 @@ static void Svcmd_PrintQueue_f( void ) } } -static void Svcmd_Chat_f( void ) -{ - char *s = ConcatArgs( 1 ); - trap_SendServerCommand( -1, va( "chat -1 \"%s\"", s ) ); - G_LogPrintf("chat: %s\n", s ); -} - -// dumb wrapper for "a" and "m" and "say" +// dumb wrapper for "a", "m", "chat", and "say" static void Svcmd_MessageWrapper( void ) { char cmd[ 5 ]; @@ -503,6 +496,8 @@ static void Svcmd_MessageWrapper( void ) Cmd_PrivateMessage_f( NULL ); else if( !Q_stricmp( cmd, "say" ) ) G_Say( NULL, SAY_ALL, ConcatArgs( 1 ) ); + else if( !Q_stricmp( cmd, "chat" ) ) + G_Say( NULL, SAY_RAW, ConcatArgs( 1 ) ); } static void Svcmd_SuddenDeath_f( void ) @@ -543,7 +538,7 @@ struct { "cp", qtrue, Svcmd_CenterPrint_f }, { "say_team", qtrue, Svcmd_TeamMessage_f }, { "say", qtrue, Svcmd_MessageWrapper }, - { "chat", qtrue, Svcmd_Chat_f }, + { "chat", qtrue, Svcmd_MessageWrapper }, { "m", qtrue, Svcmd_MessageWrapper }, { "a", qtrue, Svcmd_MessageWrapper }, { "suddendeath", qfalse, Svcmd_SuddenDeath_f } diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 0cf4ca91..8cdc5ae6 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -1379,8 +1379,16 @@ typedef enum { #define MAX_PINGREQUESTS 32 #define MAX_SERVERSTATUSREQUESTS 16 -#define SAY_ALL 0 -#define SAY_TEAM 1 +typedef enum { + SAY_ALL, + SAY_TEAM, + SAY_PRIVMSG, + SAY_TPRIVMSG, + SAY_AREA, + SAY_ADMINS, + SAY_ADMINS_PUBLIC, + SAY_RAW +} saymode_t; #define MAX_EMOTICON_NAME_LEN 16 #define MAX_EMOTICONS 64 |