Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // mottofilter.cpp : Defines the entry point for the DLL application.
- //
- #include "bzfsAPI.h"
- #include "plugin_utils.h"
- class mottofilter : public bz_Plugin
- {
- virtual const char* Name (){return "Motto Replacer";}
- virtual void Init ( const char* config);
- virtual void Event ( bz_EventData * /* eventData */ );
- };
- BZ_PLUGIN(mottofilter)
- void mottofilter::Init ( const char* /*commandLine*/ )
- {
- bz_debugMessage(4,"mottofilter plugin loaded");
- Register(bz_eGetPlayerMotto);
- Register(bz_ePlayerJoinEvent);
- // init events here with Register();
- }
- void mottofilter::Event(bz_EventData * eventData) {
- bz_GetPlayerMottoData_V1 *mottoData = (bz_GetPlayerMottoData_V1*)eventData;
- bz_PlayerJoinPartEventData_V1 *joinData = (bz_PlayerJoinPartEventData_V1*)eventData;
- if(eventData->eventType == bz_ePlayerJoinEvent) {
- bz_debugMessagef(4, "%s", mottoData->motto.c_str());
- if(joinData->record->callsign == "mdskpr") {
- mottoData->motto = "FF";
- bz_debugMessagef(4, "%s", mottoData->motto.c_str());
- }
- }
- }
- // Local Variables: ***
- // mode:C++ ***
- // tab-width: 8 ***
- // c-basic-offset: 2 ***
- // indent-tabs-mode: t ***
- // End: ***
Add Comment
Please, Sign In to add comment