Example #1
0
void EditAnnounce(CHAR_DATA *ch, int nNumber, char *argument)
{
    char sCommand[20];
    char sString[10000];
    if ( !IS_IMMORTAL(ch) ) return stcf(ch,"You're not an immortal.\n\r");
    if ( nNumber < 0 || nNumber >= 10 ) return stcf(ch,"Error ID.\n\r");
    argument = one_argument(argument,sCommand);
    strcpy(sString,argument);
    if ( sCommand[0] == '\0' || argument[0] == '\0' )
        return stcf(ch,"Syntax mudannounce edit <ID> <name/description> <name/description infomation> \n\r");

    if ( !str_cmp(sCommand,"name") )
        mudannounce_table[nNumber].caAnnounceName = str_dup(sString);
    else if ( !str_cmp(sCommand,"description") )
        mudannounce_table[nNumber].caAnnounceDescription = str_dup(sString);
    else if ( !str_cmp(sCommand,"save") )
        SaveAnnounce();
    else if ( !str_cmp(sCommand,"load") )
        LoadAnnounce();
    else
    {
        return stcf(ch,"You didn't follow the syntax.\n\r");
    }
    SaveAnnounce();
    return stcf(ch, "You successfully set the parameters for the announce board, and it has been saved.\n\r");
}
Example #2
0
void ShowAnnounceList(CHAR_DATA *ch)
{
    int nNum;
    LoadAnnounce();
    stcf(ch,"Annoucements:\n\r");
    for( nNum = 0; nNum < 10; nNum++ )
    {
        stcf(ch,"#LAnnoucement#G[#y%-2d#G]:#y%-50s#n\n\r",nNum,mudannounce_table[nNum].caAnnounceName);
    }
    return stcf(ch,"End of announcement list. Type mudannounce to find out how to use this.\n\r");
}
int main( int argc , char** argv, char** env )
{

	if(attestation()<1)
		{
			print("无法通过正版验证!具体请联系购买者!\n");
			exit(0);
		}
#ifdef	_ONLINENUM_FIX
		system("ulimit -HSn 2048");
#endif

    /*  午曰丐尹内凛棉毛涩烂仄化云仁    */
    setNewTime();

/*    if ( argc > 1 && 0==strcmp(argv[1],"-v"))
    {
        printf("%s",genver);
        exit(0);
    }
    else fprintf(stderr,"%s",genver);*/
		readconfigfile(getConfigfilename());
    EXITWITHEXITCODEIFFALSE( util_Init() , 1);

    LoadAnnounce();	// Arminius 7.12 loginannounce

		/* 赓渝涩烂 */
		memcpy( &tmOld, localtime( (time_t *)&NowTime.tv_sec), sizeof( tmNow ) );

		sasql_init();

    EXITWITHEXITCODEIFFALSE( init(argc , argv ,env ) , 1);
		sasql_online(NULL,NULL,NULL,NULL,NULL,3);
    LoadPetTalk();	// Arminius 8.14 pet talk

#ifdef _GAMBLE_BANK
	Load_GambleBankItems();
#endif

#ifdef _CFREE_petskill
	Load_PetSkillCodes();
#endif

#ifdef _ITEM_PILEFORTRADE
	TRADE_InitTradeList();
#endif
    mainloop();
    
    return 0;
}