//****************************************************************************
//SPHERE by : Menasoft ©1997-2007
//www.sphereserver.net
// All SPHERE script files and formats are copyright Menasoft & Partners.
// This file may be freely edited for personal use, but may not be distributed
// in whole or in part, in any format without express written permission from
// Menasoft & Partners.  All donations and contributions
// become the property of Menasoft & Partners.
//****************************************************************************
// FILE LAST UPDATED: 14-March-2007
VERSION=0.56b

[PLEVEL 1]
tc

[FUNCTION tc]
IF ( !<DEF0.TOWNSCFGSPEECH_GLOBAL_ENABLE> )
    RETURN 1
ENDIF

IF ( !<TOWN> )
    RETURN 1
ENDIF

LOCAL.PRIVSPEECH = <TOWN.MEMBERFROMUID.<UID>.PRIV>
IF (<LOCAL.PRIVSPEECH> == <DEF.STONEPRIV_ACCEPTED>)
    LOCAL.PRIVSPEECH = <DEF.STONEPRIV_CANDIDATE>
ENDIF

IF ((<LOCAL.PRIVSPEECH> == <DEF.STONEPRIV_CANDIDATE>) && !<DEF0.TOWNSCFGSPEECH_ENABLE_CANDIDATES>)
    RETURN 1
ENDIF

IF ((<LOCAL.PRIVSPEECH> == <DEF.STONEPRIV_MEMBER>) && !<DEF0.TOWNSCFGSPEECH_ENABLE_MEMBERS>)
    RETURN 1
ENDIF

IF (<CTAG0.TOWNSYS_LASTTOWNMSG_TIME> < <SERV.TIME>)
    CTAG.TOWNSYS_LASTTOWNMSG_TIME = <SERV.TIME> + <DEF0.TOWNSCFGSPEECH_SPAM_INTERVAL>
    f_townsys_speech_sendsmsg <town.uid>,<args>
ENDIF

[EOF]