Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tidied up plugin scripting callbacks

  • Loading branch information...
commit 54797dc5f747869caa5d867b7de73302fecb6722 1 parent 8363e59
@nickgammon authored
View
26 MUSHclient.dsp
@@ -1423,6 +1423,19 @@ SOURCE=.\install\readme.txt
# Section MUSHclient : {00000000-0001-0000-0000-000000000000}
# 1:23:CG_IDR_POPUP_MAIN_FRAME:126
# End Section
+# Section MUSHclient : {F3B1306C-16CC-11D0-B7D0-00A0247B3BFD}
+# 0:8:Splash.h:D:\SOURCE\MUSHclient\Splash.h
+# 0:10:Splash.cpp:D:\SOURCE\MUSHclient\Splash.cpp
+# 1:10:IDB_SPLASH:102
+# 2:10:ResHdrName:resource.h
+# 2:11:ProjHdrName:stdafx.h
+# 2:10:WrapperDef:_SPLASH_SCRN_
+# 2:12:SplClassName:CSplashWnd
+# 2:21:SplashScreenInsertKey:4.0
+# 2:10:HeaderName:Splash.h
+# 2:10:ImplemName:Splash.cpp
+# 2:7:BmpID16:IDB_SPLASH
+# End Section
# Section MUSHclient : {F3B13065-16CC-11D0-B7D0-00A0247B3BFD}
# 0:8:TipDlg.h:D:\SOURCE\MUSHclient\TipDlg.h
# 0:10:TipDlg.cpp:D:\SOURCE\MUSHclient\TipDlg.cpp
@@ -1448,19 +1461,6 @@ SOURCE=.\install\readme.txt
# 2:18:CG_IDS_FILE_ABSENT:CG_IDS_FILE_ABSENT
# 2:10:TipDlg.cpp:TipDlg.cpp
# End Section
-# Section MUSHclient : {F3B1306C-16CC-11D0-B7D0-00A0247B3BFD}
-# 0:8:Splash.h:D:\SOURCE\MUSHclient\Splash.h
-# 0:10:Splash.cpp:D:\SOURCE\MUSHclient\Splash.cpp
-# 1:10:IDB_SPLASH:102
-# 2:10:ResHdrName:resource.h
-# 2:11:ProjHdrName:stdafx.h
-# 2:10:WrapperDef:_SPLASH_SCRN_
-# 2:12:SplClassName:CSplashWnd
-# 2:21:SplashScreenInsertKey:4.0
-# 2:10:HeaderName:Splash.h
-# 2:10:ImplemName:Splash.cpp
-# 2:7:BmpID16:IDB_SPLASH
-# End Section
# Section MUSHclient : {00000000-0000-0000-0000-000000000000}
# 1:22:CG_IDR_POPUP_SEND_VIEW:124
# End Section
View
62 OtherTypes.h
@@ -954,83 +954,31 @@ class CPlugin :public CObject
// WARNING! PHP currently uses a DISPID of zero, so that can't be used as a "not found" flag.
- DISPID m_dispid_plugin_install ; // "OnPluginInstall"
- DISPID m_dispid_plugin_connect ; // "OnPluginConnect"
- DISPID m_dispid_plugin_disconnect ; // "OnPluginDisconnect"
- DISPID m_dispid_plugin_close ; // "OnPluginClose"
- DISPID m_dispid_plugin_save_state ; // "OnPluginSaveState"
- DISPID m_dispid_plugin_world_save ; // "OnPluginWorldSave"
- DISPID m_dispid_plugin_enable ; // "OnPluginEnable"
- DISPID m_dispid_plugin_disable ; // "OnPluginDisable"
- DISPID m_dispid_plugin_command ; // "OnPluginCommand"
- DISPID m_dispid_plugin_command_entered; // "OnPluginCommandEntered"
- DISPID m_dispid_plugin_get_focus ; // "OnPluginGetFocus"
- DISPID m_dispid_plugin_lose_focus ; // "OnPluginLoseFocus"
- DISPID m_dispid_plugin_trace ; // "OnPluginTrace"
- DISPID m_dispid_plugin_broadcast ; // "OnPluginBroadcast"
- DISPID m_dispid_plugin_screendraw ; // "OnPluginScreendraw"
- DISPID m_dispid_plugin_playsound ; // "OnPluginPlaySound"
- DISPID m_dispid_plugin_tabcomplete ; // "OnPluginTabComplete"
- // DISPID m_dispid_plugin_tooltip ; // "OnPluginToolTip"
- DISPID m_dispid_plugin_list_changed ; // "OnPluginListChanged"
- DISPID m_dispid_plugin_tick ; // "OnPluginTick"
- DISPID m_dispid_plugin_mouse_moved ; // "OnPluginMouseMoved"
-
- DISPID m_dispid_plugin_send ; // "OnPluginSend"
- DISPID m_dispid_plugin_sent ; // "OnPluginSent"
- DISPID m_dispid_plugin_line_received; // "OnPluginLineReceived"
- DISPID m_dispid_plugin_packet_received; // "OnPluginPacketReceived"
- DISPID m_dispid_plugin_partial_line; // "OnPluginPartialLine"
- DISPID m_dispid_plugin_telnet_option; // "OnPluginTelnetOption"
- DISPID m_dispid_plugin_telnet_request; // "OnPluginTelnetRequest"
- DISPID m_dispid_plugin_telnet_subnegotiation; // "OnPluginTelnetSubnegotiation"
- DISPID m_dispid_plugin_IAC_GA; // "OnPlugin_IAC_GA"
- DISPID m_dispid_plugin_on_world_output_resized; // "OnPluginWorldOutputResized"
- DISPID m_dispid_plugin_on_command_changed; // "OnPluginCommandChanged"
-
- DISPID m_dispid_plugin_OnMXP_Start; // "OnPluginMXPstart"
- DISPID m_dispid_plugin_OnMXP_Stop; // "OnPluginMXPstop"
- DISPID m_dispid_plugin_OnMXP_OpenTag; // "OnPluginMXPopenTag"
- DISPID m_dispid_plugin_OnMXP_CloseTag; // "OnPluginMXPcloseTag"
- DISPID m_dispid_plugin_OnMXP_SetVariable; // "OnPluginMXPsetVariable"
- DISPID m_dispid_plugin_OnMXP_SetEntity; // "OnPluginMXPsetEntity"
- DISPID m_dispid_plugin_OnMXP_Error; // "OnPluginMXPerror"
-
- DISPID m_dispid_plugin_On_Chat_Accept; // "OnPluginChatAccept"
- DISPID m_dispid_plugin_On_Chat_Message; // "OnPluginChatMessage"
- DISPID m_dispid_plugin_On_Chat_MessageOut;// "OnPluginChatMessageOut"
- DISPID m_dispid_plugin_On_Chat_Display; // "OnPluginChatDisplay"
- DISPID m_dispid_plugin_On_Chat_NewUser; // "OnPluginChatNewUser"
- DISPID m_dispid_plugin_On_Chat_UserDisconnect; // "OnPluginChatUserDisconnect"
+ map<const char *, DISPID> m_PluginCallbacks; // maps plugin callback names to their DISPIDs
+
// methods
CPlugin (CMUSHclientDoc * pDoc); // constructor
~CPlugin (); // destructor
bool SaveState (const bool bScripted = false);
DISPID GetPluginDispid (const char * sName);
- void ExecutePluginScript (const char * sName,
- DISPID & iRoutine); // no arguments
+ void ExecutePluginScript (const char * sName); // no arguments
bool ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const char * sText); // 1 argument
bool ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const long arg1, // 2 arguments
const string sText);
bool ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const long arg1, // 3 arguments
const long arg2,
const string sText);
bool ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const long arg1, // 1 number, 3 strings
const char * arg2,
const char * arg3,
const char * arg4);
- void ExecutePluginScript (const char * sName,
- CString & strResult, // taking and returning a string
- DISPID & iRoutine);
+ void ExecutePluginScriptRtn (const char * sName,
+ CString & strResult); // taking and returning a string
};
View
15 ProcessPreviousLine.cpp
@@ -455,19 +455,8 @@ assemble the full text of the original line.
m_iCurrentActionSource = eInputFromServer;
- // tell each plugin what we have received
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- if (!pPlugin->ExecutePluginScript (ON_PLUGIN_LINE_RECEIVED, pPlugin->m_dispid_plugin_line_received, strCurrentLine))
- bNoOutput = true;
- } // end of doing each plugin
- m_CurrentPlugin = NULL;
+ if (!SendToAllPluginCallbacks (ON_PLUGIN_LINE_RECEIVED, strCurrentLine))
+ bNoOutput = true;
m_iCurrentActionSource = eUnknownActionSource;
View
147 chatsock.cpp
@@ -118,24 +118,12 @@ CChatSocket::~CChatSocket()
if (m_bWasConnected)
{
- CPlugin * pSavedPlugin = m_pDoc->m_CurrentPlugin;
// tell each plugin about the departing user
- for (POSITION pluginpos = m_pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_CHAT_USERDISCONNECT,
- pPlugin->m_dispid_plugin_On_Chat_UserDisconnect,
- m_iChatID, // user ID
- string (m_strRemoteUserName) // user name
- );
- } // end of doing each plugin
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
+ m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_CHAT_USERDISCONNECT,
+ m_iChatID, // user ID
+ string (m_strRemoteUserName),
+ false, false);
} // end of needing to notify about him
}
@@ -185,7 +173,6 @@ void CChatSocket::OnReceive(int nErrorCode)
char buff [1000];
int count = Receive (buff, sizeof (buff) - 1);
-POSITION pluginpos;
if (count == SOCKET_ERROR)
{
@@ -258,24 +245,12 @@ POSITION pluginpos;
SendChatMessage (CHAT_STAMP, MakeStamp (m_zChatStamp)); // send it
}
- CPlugin * pSavedPlugin = m_pDoc->m_CurrentPlugin;
-
// tell each plugin about the new user
- for (pluginpos = m_pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_CHAT_NEWUSER,
- pPlugin->m_dispid_plugin_On_Chat_NewUser,
- m_iChatID, // user ID
- string (m_strRemoteUserName) // user name
- );
- } // end of doing each plugin
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
+ m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_CHAT_NEWUSER,
+ m_iChatID, // user ID
+ string (m_strRemoteUserName),
+ false,
+ false);
if (count <= 0)
return; // only the negotiation text here
@@ -354,32 +329,18 @@ POSITION pluginpos;
count = 0; // can't see how this packet can be reasonably terminated
- CPlugin * pSavedPlugin = m_pDoc->m_CurrentPlugin;
-
- // tell each plugin what we are about to display
- for (pluginpos = m_pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- if (!pPlugin->ExecutePluginScript (ON_PLUGIN_CHAT_ACCEPT,
- pPlugin->m_dispid_plugin_On_Chat_Accept,
- CFormat ("%s,%s",
- (LPCTSTR) inet_ntoa (m_ServerAddr.sin_addr),
- (LPCTSTR) m_strRemoteUserName
- )))
+ if (!m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_CHAT_ACCEPT,
+ CFormat ("%s,%s",
+ (LPCTSTR) inet_ntoa (m_ServerAddr.sin_addr),
+ (LPCTSTR) m_strRemoteUserName
+ ),
+ true)) // stop on false response
{
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
// tell them our rejection
SendData ("NO");
OnClose (0);
return; // false means plugin rejects him
}
- } // end of doing each plugin
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
if (m_pDoc->m_bValidateIncomingCalls)
{
@@ -421,24 +382,12 @@ POSITION pluginpos;
SendChatMessage (CHAT_STAMP, MakeStamp (m_zChatStamp)); // send it
}
- pSavedPlugin = m_pDoc->m_CurrentPlugin;
-
// tell each plugin about the new user
- for (POSITION pluginpos = m_pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_CHAT_NEWUSER,
- pPlugin->m_dispid_plugin_On_Chat_NewUser,
- m_iChatID, // user ID
- string (m_strRemoteUserName) // user name
- );
- } // end of doing each plugin
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
+ m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_CHAT_NEWUSER,
+ m_iChatID, // user ID
+ string (m_strRemoteUserName),
+ false,
+ false);
if (count <= 0)
return; // only the negotiation text here
@@ -733,29 +682,14 @@ void CChatSocket::ProcessChatMessage (const int iMessage, const CString strMessa
#endif
- CPlugin * pSavedPlugin = m_pDoc->m_CurrentPlugin;
+ if (!m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_CHAT_MESSAGE,
+ m_iChatID, // who we are
+ iMessage, // message number
+ string (strMessage), // message text
+ false,
+ true)) // stop on false response
+ return; // false means plugin handled it
- // tell each plugin what we are about to display
- for (POSITION pluginpos = m_pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- if (!pPlugin->ExecutePluginScript (ON_PLUGIN_CHAT_MESSAGE,
- pPlugin->m_dispid_plugin_On_Chat_Message,
- m_iChatID, // who we are
- iMessage, // message number
- string (strMessage) // message text
- ))
- {
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
- return; // false means plugin handled it
- }
- } // end of doing each plugin
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
switch (iMessage)
{
@@ -821,28 +755,13 @@ void CChatSocket::SendChatMessage (const int iMessage,
#endif
- CPlugin * pSavedPlugin = m_pDoc->m_CurrentPlugin;
- // tell each plugin what we are about to display
- for (POSITION pluginpos = m_pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- if (!pPlugin->ExecutePluginScript (ON_PLUGIN_CHAT_MESSAGE_OUT,
- pPlugin->m_dispid_plugin_On_Chat_MessageOut,
- m_iChatID, // which chat ID
- iMessage, // message number
- string (strMessage) // message text
- ))
- {
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
+ if (!m_pDoc->SendToAllPluginCallbacks (ON_PLUGIN_CHAT_MESSAGE_OUT,
+ m_iChatID, // which chat ID
+ iMessage, // message number
+ string (strMessage), // message text
+ false,
+ true)) // stop on false response
return; // false means plugin discarded it
- }
- } // end of doing each plugin
- m_pDoc->m_CurrentPlugin = pSavedPlugin;
if (iMessage == CHAT_SNOOP && m_bYouAreSnooping)
m_bYouAreSnooping = false;
View
370 doc.cpp
@@ -1285,24 +1285,12 @@ CString str = strText;
if (!m_bPluginProcessingSend)
{
m_bPluginProcessingSend = true; // so we don't go into a loop
- bool bOK = true;
- // tell each plugin what we are about to send - it can return false to cancel send
- for (POSITION pos = m_PluginList.GetHeadPosition(); pos; )
+ if (!SendToAllPluginCallbacks (ON_PLUGIN_SEND, str.Left (str.GetLength () - 2)))
{
- CPlugin * pPlugin = m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this, excluding the ENDLINE
- if (!pPlugin->ExecutePluginScript (ON_PLUGIN_SEND, pPlugin->m_dispid_plugin_send, str.Left (str.GetLength () - 2)))
- bOK = false;
- } // end of doing each plugin
-
+ m_bPluginProcessingSend = false;
+ return; // plugin declines to send this line
+ }
m_bPluginProcessingSend = false;
-
- if (!bOK)
- return; // plugin doesn't want to send it
}
// "OnPluginSent" - we are definitely sending this
@@ -1311,21 +1299,8 @@ CString str = strText;
if (!m_bPluginProcessingSent)
{
m_bPluginProcessingSent = true; // so we don't go into a loop
-
- // tell each plugin what we are about to send
- for (POSITION pos = m_PluginList.GetHeadPosition(); pos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this, excluding the ENDLINE
- pPlugin->ExecutePluginScript (ON_PLUGIN_SENT, pPlugin->m_dispid_plugin_sent, str.Left (str.GetLength () - 2));
- } // end of doing each plugin
-
+ SendToAllPluginCallbacks (ON_PLUGIN_SENT, str.Left (str.GetLength () - 2));
m_bPluginProcessingSent = false;
-
}
// echo sent text if required
@@ -1833,21 +1808,7 @@ CString strLine (lpszText, size);
m_iCurrentActionSource = eInputFromServer;
- // tell each plugin what we have received
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_PACKET_RECEIVED,
- strLine, // input and output line
- pPlugin->m_dispid_plugin_packet_received);
-
- } // end of doing each plugin
+ SendToAllPluginCallbacksRtn (ON_PLUGIN_PACKET_RECEIVED, strLine);
m_iCurrentActionSource = eUnknownActionSource;
@@ -4779,18 +4740,7 @@ void CMUSHclientDoc::CheckTickTimers ()
} // end of being a CSendView
}
- // tell each plugin about the tick
- for (POSITION pos = m_PluginList.GetHeadPosition(); pos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- pPlugin->ExecutePluginScript (ON_PLUGIN_TICK, pPlugin->m_dispid_plugin_tick);
- } // end of doing each plugin
-
- m_CurrentPlugin = NULL;
+ SendToAllPluginCallbacks (ON_PLUGIN_TICK);
} // end of CMUSHclientDoc::CheckTickTimers
@@ -4935,23 +4885,7 @@ BOOL CMUSHclientDoc::DoSave(LPCTSTR lpszPathName, BOOL bReplace)
// now do plugins "world save"
- CPlugin * pSavedPlugin = m_CurrentPlugin;
- m_CurrentPlugin = NULL;
-
- // tell each plugin the world is saving
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_WORLD_SAVE, pPlugin->m_dispid_plugin_world_save);
- } // end of doing each plugin
-
- m_CurrentPlugin = pSavedPlugin;
-
+ SendToAllPluginCallbacks (ON_PLUGIN_WORLD_SAVE);
BOOL bSuccess = CDocument::DoSave (strNewName, bReplace);
@@ -7336,17 +7270,7 @@ ::AfxMessageBox ( strIpAddress);
}
} // end of executing open script
- // tell each plugin we have connected
- for (POSITION pos = m_PluginList.GetHeadPosition(); pos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- pPlugin->ExecutePluginScript (ON_PLUGIN_CONNECT, pPlugin->m_dispid_plugin_connect);
- } // end of doing each plugin
-
+ SendToAllPluginCallbacks (ON_PLUGIN_CONNECT);
} // end of CMUSHclientDoc::ConnectionEstablished
@@ -7810,30 +7734,9 @@ UINT dFormat = 0;
void CMUSHclientDoc::SendLineToPlugin (void)
{
- // We can be in a plugin if we had a prompt, which was not terminated, then
- // user input. The user input calls an alias, the alias does a world.note
- // inside a plugin, however we are here right now because we are terminating the
- // *previous* line (the prompt line).
- // So, we save and restore the current plugin pointer.
-
- CPlugin * pSavedPlugin = m_CurrentPlugin;
- m_CurrentPlugin = NULL;
-
- CString strPartialLine = CString (m_pCurrentLine->text, m_pCurrentLine->len);
-
- // tell each plugin what we have received
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_PARTIAL_LINE, pPlugin->m_dispid_plugin_partial_line, strPartialLine);
- } // end of doing each plugin
- m_CurrentPlugin = pSavedPlugin;
+ CString strPartialLine = CString (m_pCurrentLine->text, m_pCurrentLine->len);
+ SendToAllPluginCallbacks (ON_PLUGIN_PARTIAL_LINE, strPartialLine);
} // end of CMUSHclientDoc::SendLineToPlugin
@@ -7943,31 +7846,12 @@ static bool bInScreendraw = false;
return;
bInScreendraw = true;
-
- // send to all plugins
- CPlugin * pSavedPlugin = m_CurrentPlugin;
- m_CurrentPlugin = NULL;
-
- // tell a plugin the message
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_SCREENDRAW,
- pPlugin->m_dispid_plugin_screendraw,
- iType,
- iLog,
- sText
- );
-
- } // end of doing each plugin
-
- m_CurrentPlugin = pSavedPlugin;
+ SendToAllPluginCallbacks (ON_PLUGIN_SCREENDRAW,
+ iType,
+ iLog,
+ sText,
+ false,
+ false);
bInScreendraw = false;
} // end of CMUSHclientDoc::Screendraw
@@ -7981,34 +7865,12 @@ bool CMUSHclientDoc::PlaySoundFile (CString strSound)
{
m_bInPlaySoundFilePlugin = true;
- // see if a plugin will handle sound message
- CPlugin * pSavedPlugin = m_CurrentPlugin;
- m_CurrentPlugin = NULL;
-
- // tell a plugin the sound to play
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_PLAYSOUND,
- strSound,
- pPlugin->m_dispid_plugin_playsound);
-
- if (pPlugin->m_dispid_plugin_playsound != DISPID_UNKNOWN)
+ if (SendToFirstPluginCallbacks (ON_PLUGIN_PLAYSOUND, strSound))
{
- m_CurrentPlugin = pSavedPlugin;
m_bInPlaySoundFilePlugin = false;
return true; // handled by plugin? don't do our own sound
}
- } // end of doing each plugin
-
- m_CurrentPlugin = pSavedPlugin;
m_bInPlaySoundFilePlugin = false;
} // of not in plugin already
@@ -8025,40 +7887,16 @@ void CMUSHclientDoc::CancelSound (void)
{
m_bInCancelSoundFilePlugin = true;
- // see if a plugin will handle cancel sound message
- CPlugin * pSavedPlugin = m_CurrentPlugin;
- m_CurrentPlugin = NULL;
-
- // tell a plugin the sound to play
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- CString strSound; // deliberately the empty string
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_PLAYSOUND,
- strSound, // empty string cancels sound
- pPlugin->m_dispid_plugin_playsound);
-
- if (pPlugin->m_dispid_plugin_playsound != DISPID_UNKNOWN)
+ CString strSound; // deliberately the empty string
+ if (SendToFirstPluginCallbacks (ON_PLUGIN_PLAYSOUND, strSound))
{
- m_CurrentPlugin = pSavedPlugin;
m_bInCancelSoundFilePlugin = false;
- return; // handled by plugin? don't do our own cancel
+ return; // handled by plugin? don't do our own sound
}
- } // end of doing each plugin
-
- m_CurrentPlugin = pSavedPlugin;
m_bInCancelSoundFilePlugin = false;
} // end of not in plugin already
-
// default sound-cancel mechanism
Frame.CancelSound ();
StopSound (0); // also DirectSound
@@ -8206,10 +8044,36 @@ static bool bInPluginListChanged = false;
return;
bInPluginListChanged = true;
+ SendToAllPluginCallbacks (ON_PLUGIN_LIST_CHANGED);
+ bInPluginListChanged = false;
+
+ } // end CMUSHclientDoc::PluginListChanged
+void CMUSHclientDoc::SendToAllPluginCallbacks (const char * sName) // no arguments
+ {
CPlugin * pSavedPlugin = m_CurrentPlugin;
- m_CurrentPlugin = NULL;
+ m_CurrentPlugin = NULL; // not sure about this
+
+ // tell a plugin the message
+ for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
+ {
+ CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
+
+ if (pPlugin->m_bEnabled) // ignore disabled plugins
+ pPlugin->ExecutePluginScript (sName);
+
+ } // end of doing each plugin
+
+ m_CurrentPlugin = pSavedPlugin;
+
+ } // end of CMUSHclientDoc::SendToAllPluginCallbacks
+
+// this is for when we want the first available plugin to handle something (eg. Trace, Sound)
+bool CMUSHclientDoc::SendToFirstPluginCallbacks (const char * sName, const char * sText) // one argument
+ {
+ CPlugin * pSavedPlugin = m_CurrentPlugin;
+ m_CurrentPlugin = NULL; // not sure about this
// tell a plugin the message
for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
@@ -8219,13 +8083,145 @@ static bool bInPluginListChanged = false;
if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
continue;
- pPlugin->ExecutePluginScript (ON_PLUGIN_LIST_CHANGED, pPlugin->m_dispid_plugin_list_changed);
+ // see what the plugin makes of this,
+ pPlugin->ExecutePluginScript (sName, sText);
+
+ if (pPlugin->m_PluginCallbacks [sName] != DISPID_UNKNOWN)
+ {
+ m_CurrentPlugin = pSavedPlugin;
+ return true; // indicate we found it
+ }
} // end of doing each plugin
m_CurrentPlugin = pSavedPlugin;
- bInPluginListChanged = false;
+ return false; // didn't find one
+ } // end of CMUSHclientDoc::SendToFirstPluginCallbacks
- } // end CMUSHclientDoc::PluginListChanged
+// this is for when each plugin gets a chance to "black ball" an action (like sending a line)
+// we only return true if each plugin returned true
+bool CMUSHclientDoc::SendToAllPluginCallbacks (const char * sName,
+ const char * sText, // one argument
+ const bool bStopOnFalse)
+ {
+ CPlugin * pSavedPlugin = m_CurrentPlugin;
+ m_CurrentPlugin = NULL; // not sure about this
+ bool bResult = true; // assume they OK'd something
+
+ // tell a plugin the message
+ for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
+ {
+ CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
+
+ if (pPlugin->m_bEnabled) // ignore disabled plugins
+ if (!pPlugin->ExecutePluginScript (sName, sText))
+ bResult = false;
+
+ if (bStopOnFalse && !bResult && pPlugin->m_PluginCallbacks [sName] != DISPID_UNKNOWN)
+ return false;
+
+ } // end of doing each plugin
+
+ m_CurrentPlugin = pSavedPlugin;
+
+ return bResult;
+ } // end of CMUSHclientDoc::SendToAllPluginCallbacks
+
+
+// this sends a string to all plugins and allows them to modify it
+void CMUSHclientDoc::SendToAllPluginCallbacksRtn (const char * sName, CString & strResult) // taking and returning a string
+ {
+ CPlugin * pSavedPlugin = m_CurrentPlugin;
+ m_CurrentPlugin = NULL; // not sure about this
+
+ // tell a plugin the message
+ for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
+ {
+ CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
+
+ if (pPlugin->m_bEnabled) // ignore disabled plugins
+ pPlugin->ExecutePluginScriptRtn (sName, strResult);
+
+ } // end of doing each plugin
+
+ m_CurrentPlugin = pSavedPlugin;
+
+ } // end of CMUSHclientDoc::SendToAllPluginCallbacks
+
+
+// this sends a number and a string to all plugins, and optionally stops on a true or false response
+bool CMUSHclientDoc::SendToAllPluginCallbacks (const char * sName,
+ const long arg1, // 2 arguments
+ const string sText,
+ const bool bStopOnTrue,
+ const bool bStopOnFalse)
+ {
+ CPlugin * pSavedPlugin = m_CurrentPlugin;
+ m_CurrentPlugin = NULL; // not sure about this
+
+ // tell a plugin the message
+ for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
+ {
+ CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
+
+ if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
+ continue;
+
+ bool bResult = pPlugin->ExecutePluginScript (sName, arg1, sText);
+
+ if (bStopOnTrue && bResult && pPlugin->m_PluginCallbacks [sName] != DISPID_UNKNOWN)
+ return true;
+
+ if (bStopOnFalse && !bResult && pPlugin->m_PluginCallbacks [sName] != DISPID_UNKNOWN)
+ return false;
+
+ } // end of doing each plugin
+
+ m_CurrentPlugin = pSavedPlugin;
+
+ if (bStopOnTrue)
+ return false;
+ else
+ return !bStopOnFalse; // if they wanted to stop on true, assume false and vice-versa
+
+ } // end of CMUSHclientDoc::SendToAllPluginCallbacks
+
+// this sends two numbers and a string to all plugins, and optionally stops on a true or false response
+bool CMUSHclientDoc::SendToAllPluginCallbacks (const char * sName,
+ const long arg1, // 3 arguments
+ const long arg2,
+ const string sText,
+ const bool bStopOnTrue,
+ const bool bStopOnFalse)
+ {
+ CPlugin * pSavedPlugin = m_CurrentPlugin;
+ m_CurrentPlugin = NULL; // not sure about this
+
+ // tell a plugin the message
+ for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
+ {
+ CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
+
+ if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
+ continue;
+
+ bool bResult = pPlugin->ExecutePluginScript (sName, arg1, arg2, sText);
+
+ if (bStopOnTrue && bResult && pPlugin->m_PluginCallbacks [sName] != DISPID_UNKNOWN)
+ return true;
+
+ if (bStopOnFalse && !bResult && pPlugin->m_PluginCallbacks [sName] != DISPID_UNKNOWN)
+ return false;
+
+ } // end of doing each plugin
+
+ m_CurrentPlugin = pSavedPlugin;
+
+ if (bStopOnTrue)
+ return false;
+ else
+ return !bStopOnFalse; // if they wanted to stop on true, assume false and vice-versa
+
+ } // end of CMUSHclientDoc::SendToAllPluginCallbacks
View
31 doc.h
@@ -1864,6 +1864,37 @@ class CMUSHclientDoc : public CDocument
CPlugin * GetPlugin (LPCTSTR PluginID);
CMUSHView * GetFirstOutputWindow ();
+ // calls sName in all plugins
+ void SendToAllPluginCallbacks (const char * sName); // no arguments
+
+ // sends sText to all plugins, stops when one handles it, returns true if handled
+ bool SendToFirstPluginCallbacks (const char * sName,
+ const char * sText); // one argument
+
+ // sends sText to all plugins, returns false if one returned false
+ bool SendToAllPluginCallbacks (const char * sName,
+ const char * sText, // one argument
+ const bool bStopOnFalse = false);
+
+ // send strResult to all plugins, allow them to modify it
+ void SendToAllPluginCallbacksRtn (const char * sName,
+ CString & strResult); // taking and returning a string
+
+ // send a number and a string to all plugins, optionally stopping when one returns true or false
+ bool SendToAllPluginCallbacks (const char * sName,
+ const long arg1, // 2 arguments
+ const string sText,
+ const bool bStopOnTrue,
+ const bool bStopOnFalse);
+
+ // send two numbers and a string to all plugins, optionally stopping when one returns true or false
+ bool SendToAllPluginCallbacks (const char * sName,
+ const long arg1, // 3 arguments
+ const long arg2,
+ const string sText,
+ const bool bStopOnTrue,
+ const bool bStopOnFalse);
+
// load from document into property page
void LoadPrefsP1 (CPrefsP1 &page1);
View
1,302 mushclient.clw
@@ -2,180 +2,34 @@
[General Info]
Version=1
-LastClass=CMUSHclientDoc
+LastClass=CAboutDlg
LastTemplate=CDialog
NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "mushclient.h"
LastPage=0
-; ClassWizard DDX information for custom DDX functions
-ExtraDDXCount=2
-ExtraDDX1=E;;String with min and max;CString;;MinMaxString;CString with a minimum and maximum length;MinMaxString;M&inimum length;d;Ma&ximum length;d
-ExtraDDX2=M;;String with min and max;CString;;MinMaxCBString;CString with a minimum and maximum length;MinMaxCBString;M&inimum length;d;Ma&ximum length;d
-ClassCount=161
+ClassCount=19
Class1=CActivityChildFrame
Class2=CActivityDoc
Class3=CActivityView
-Class4=CAliasDlg
-Class5=CAsciiArtDlg
-Class6=CColourButton
-Class7=CChildFrame
-Class8=CChooseNotepadDlg
-Class9=CCmdHistory
-Class10=CColourComboBox
-Class11=CColourPickerDlg
-Class12=CCommandOptionsDlg
-Class13=CConfirmPreamble
-Class14=CCreditsDlg
-Class15=CDebugWorldInputDlg
-Class16=CDelayDlg
-Class17=CMUSHclientDoc
-Class18=CEasterEggDlg
-Class19=CEditDlg
-Class20=CEditMacro
-Class21=CEditMultiLine
-Class22=CEditString
-Class23=CEditVariable
-Class24=CFindDlg
-Class25=CGeneratedNameDlg
-Class26=CGenPropertyPage
-Class27=CGlobalChangeDlg
-Class28=CGlobalConfigurationDlg
-Class29=CGlobalPrefsP1
-Class30=CGlobalPrefsP2
-Class31=CGlobalPrefsP3
-Class32=CGlobalPrefsP4
-Class33=CGlobalPrefsP5
-Class34=CGlobalPrefsP6
-Class35=CGlobalPrefsP7
-Class36=CGlobalPrefsP9
-Class37=CGlobalPrefsP10
-Class38=CGlobalPrefsSheet
-Class39=CGoToLineDlg
-Class40=CImmediateDlg
-Class41=CImportXMLdlg
-Class42=CLogDlg
-Class43=CMainFrame
-Class44=CMapCommentDlg
-Class45=CMapDlg
-Class46=CMapMoveDlg
-Class47=CMissingEntryPoints
-Class48=CMUSHclientApp
-Class49=CAboutDlg
-Class50=CMUSHView
-Class51=CMXPscriptRoutinesDlg
-Class52=CMySplitterWnd
-Class53=CPasswordDialog
-Class54=CPluginsDlg
-Class55=CPluginWizardPage1
-Class56=CPluginWizardPage2
-Class57=CPluginWizardPage3
-Class58=CPluginWizardPage4
-Class59=CPluginWizardPage5
-Class60=CPluginWizardPage6
-Class61=CPluginWizardPage7
-Class62=CPluginWizardPage8
-Class63=CPluginWizardSheet
-Class64=CPrefsP1
-Class65=CPrefsP2
-Class66=CPrefsP3
-Class67=CPrefsP4
-Class68=CPrefsP5
-Class69=CPrefsP6
-Class70=CPrefsP7
-Class71=CPrefsP8
-Class72=CPrefsP9
-Class73=CPrefsP10
-Class74=CPrefsP11
-Class75=CPrefsP12
-Class76=CPrefsP13
-Class77=CPrefsP14
-Class78=CPrefsP15
-Class79=CPrefsP16
-Class80=CPrefsP17
-Class81=CPrefsP18
-Class82=CPrefsP19
-Class83=CPrefsP20
-Class84=CPrefsP21
-Class85=CPrefsP0
-Class86=CPrefsP22
-Class87=CPrefsP23
-Class88=CPrefsPropertySheet
-Class89=CProgressDlg
-Class90=CQuickConnectDlg
-Class91=CRecallDlg
-Class92=CRecallSearchDlg
-Class93=CRegistrationPropertyPage1
-Class94=CRegistrationPropertyPage2
-Class95=CRegistrationPropertyPage3
-Class96=CRegistrationPropertyPage4
-Class97=CRegistrationPropertyPage5
-Class98=CRegistrationPropertyPage6
-Class99=CRegistrationPropertyPage7
-Class100=CRegistrationPropertyPage8
-Class101=CRegistrationPropertyPage9
-Class102=CRegistrationPropertyPage10
-Class103=CRegistrationPropertyPage11
-Class104=CRegistrationPropertyPage12
-Class105=CRegistrationPropertyPage13
-Class106=CRegistrationPropertyPage14
-Class107=CRegistrationPropertyPage15
-Class108=CRegistrationPropertyPage16
-Class109=CRegistrationPropertyPage17
-Class110=CRegistrationPropertySheet
-Class111=CScriptErrorDlg
-Class112=CSendToAllDlg
-Class113=CSendView
-Class114=CSplashWnd
-Class115=CTabDefaultsDlg
-Class116=CTestCommandDialog
-Class117=CTestResultDialog
-Class118=CTextAttributesDlg
-Class119=CTextChildFrame
-Class120=CTextDocument
-Class121=CTextView
-Class122=CTimerDlg
-Class123=CTimerWnd
-Class124=CTipDlg
-Class125=CTreePropertySheet
-Class126=CTriggerDlg
-Class127=CTriggerTestDialog
-Class128=CWelcomeDlg
-Class129=CWelcome1Dlg
-Class130=CWinsockInfoDlg
-Class131=CWorldConfiguration
+Class4=CChildFrame
+Class5=CMUSHclientDoc
+Class6=CMyToolBar
+Class7=CMainFrame
+Class8=CMDITabs
+Class9=CMUSHclientApp
+Class10=CAboutDlg
+Class11=CMUSHView
+Class12=CMySplitterWnd
+Class13=CMyStatusBar
+Class14=CSendView
+Class15=CTextChildFrame
+Class16=CTextDocument
+Class17=CTextView
+Class18=CTimerWnd
+Class19=UDPsocket
ResourceCount=0
-Class132=CChatListDlg
-Class133=CChatCallDlg
-Class134=CChatToAllDlg
-Class135=CEmoteToAllDlg
-Class136=CChatDetailsDlg
-Class137=CProxyServerPasswordDlg
-Class138=CGlobalPrefsP11
-Class139=CMyStatusBar
-Class140=CGlobalPrefsP12
-Class141=CRegexpProblemDlg
-Class142=CPaneView
-Class143=CPaneChildWnd
-Class144=CGlobalPrefsP13
-Class145=UDPsocket
-Class146=CRegisterMUSHclient
-Class147=CHighlightPhraseDlg
-Class148=CUniqueIDDlg
-Class149=CMultiLineTriggerDlg
-Class150=CLuaInputBox
-Class151=CLuaChooseBox
-Class152=CLuaChooseList
-Class153=CFunctionListDlg
-Class154=CLuaGsubDlg
-Class155=CCompleteWordDlg
-Class156=CLuaInputEditDlg
-Class157=CKeyNameDlg
-Class158=CLuaChooseListMulti
-Class159=CDebugLuaDlg
-Class160=CSpellCheckDlg
-Class161=CInsertUnicodeDlg
[CLS:CActivityChildFrame]
Type=0
@@ -195,327 +49,41 @@ BaseClass=CListView
HeaderFile=ActivityView.h
ImplementationFile=ActivityView.cpp
-[CLS:CAliasDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=aliasdlg.h
-ImplementationFile=aliasdlg.cpp
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CAsciiArtDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=AsciiArtDlg.h
-ImplementationFile=AsciiArtDlg.cpp
-
-[CLS:CColourButton]
-Type=0
-BaseClass=CButton
-HeaderFile=ButtonColour.h
-ImplementationFile=ButtonColour.cpp
-
[CLS:CChildFrame]
Type=0
BaseClass=CMDIChildWnd
HeaderFile=childfrm.h
ImplementationFile=childfrm.cpp
-LastObject=CChildFrame
-
-[CLS:CChooseNotepadDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=ChooseNotepadDlg.h
-ImplementationFile=ChooseNotepadDlg.cpp
-
-[CLS:CCmdHistory]
-Type=0
-BaseClass=CDialog
-HeaderFile=cmdhist.h
-ImplementationFile=cmdhist.cpp
-
-[CLS:CColourComboBox]
-Type=0
-BaseClass=CComboBox
-HeaderFile=ColourComboBox.h
-ImplementationFile=ColourComboBox.cpp
-
-[CLS:CColourPickerDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=ColourPickerDlg.h
-ImplementationFile=ColourPickerDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=CColourPickerDlg
-
-[CLS:CCommandOptionsDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=CommandOptionsDlg.h
-ImplementationFile=CommandOptionsDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_SEND_DOUBLE_HEX_FF
-
-[CLS:CConfirmPreamble]
-Type=0
-BaseClass=CDialog
-HeaderFile=ConfirmPreamble.h
-ImplementationFile=ConfirmPreamble.cpp
-
-[CLS:CCreditsDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=CreditsDlg.h
-ImplementationFile=CreditsDlg.cpp
-
-[CLS:CDebugWorldInputDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=DebugWorldInputDlg.h
-ImplementationFile=DebugWorldInputDlg.cpp
-LastObject=IDC_SPECIAL
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CDelayDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=DelayDlg.h
-ImplementationFile=DelayDlg.cpp
-LastObject=CDelayDlg
[CLS:CMUSHclientDoc]
Type=0
BaseClass=CDocument
HeaderFile=doc.h
ImplementationFile=doc.cpp
-Filter=N
-VirtualFilter=DC
-LastObject=CMUSHclientDoc
-
-[CLS:CEasterEggDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=EasterEggDlg.h
-ImplementationFile=EasterEggDlg.cpp
-
-[CLS:CEditDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=EditDlg.h
-ImplementationFile=EditDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_REGEXP_BUTTON
-
-[CLS:CEditMacro]
-Type=0
-BaseClass=CDialog
-HeaderFile=editmac.h
-ImplementationFile=editmac.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=CEditMacro
-
-[CLS:CEditMultiLine]
-Type=0
-BaseClass=CDialog
-HeaderFile=EditMultiLine.h
-ImplementationFile=EditMultiLine.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=CEditMultiLine
-
-[CLS:CEditString]
-Type=0
-BaseClass=CDialog
-HeaderFile=editstr.h
-ImplementationFile=editstr.cpp
-
-[CLS:CEditVariable]
-Type=0
-BaseClass=CDialog
-HeaderFile=EditVariable.h
-ImplementationFile=EditVariable.cpp
-
-[CLS:CFindDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=FindDlg.h
-ImplementationFile=FindDlg.cpp
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CGeneratedNameDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=GeneratedNameDlg.h
-ImplementationFile=GeneratedNameDlg.cpp
-
-[CLS:CGenPropertyPage]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GenPropertyPage.h
-ImplementationFile=genpropertypage.cpp
-
-[CLS:CGlobalChangeDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=GlobalChangeDlg.h
-ImplementationFile=GlobalChangeDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=CGlobalChangeDlg
-
-[CLS:CGlobalConfigurationDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=GlobalConfigurationDlg.h
-ImplementationFile=GlobalConfigurationDlg.cpp
-
-[CLS:CGlobalPrefsP1]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CGlobalPrefsP1
-
-[CLS:CGlobalPrefsP2]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CGlobalPrefsP2
-
-[CLS:CGlobalPrefsP3]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-
-[CLS:CGlobalPrefsP4]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-
-[CLS:CGlobalPrefsP5]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-
-[CLS:CGlobalPrefsP6]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CGlobalPrefsP7]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-
-[CLS:CGlobalPrefsP9]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-
-[CLS:CGlobalPrefsP10]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=GlobalPrefs.h
-ImplementationFile=GlobalPrefs.cpp
-
-[CLS:CGlobalPrefsSheet]
-Type=0
-BaseClass=CPropertySheet
-HeaderFile=GlobalPrefsSheet.h
-ImplementationFile=GlobalPrefsSheet.cpp
-
-[CLS:CGoToLineDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=GoToLineDlg.h
-ImplementationFile=GoToLineDlg.cpp
-
-[CLS:CImmediateDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=ImmediateDlg.h
-ImplementationFile=ImmediateDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_EDIT
-
-[CLS:CImportXMLdlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=ImportXMLdlg.h
-ImplementationFile=ImportXMLdlg.cpp
-LastObject=CImportXMLdlg
-Filter=D
-VirtualFilter=dWC
-[CLS:CLogDlg]
+[CLS:CMyToolBar]
Type=0
-BaseClass=CDialog
-HeaderFile=logdlg.h
-ImplementationFile=logdlg.cpp
+BaseClass=CToolBar
+HeaderFile=mainfrm.h
+ImplementationFile=mainfrm.cpp
[CLS:CMainFrame]
Type=0
BaseClass=CMDIFrameWnd
HeaderFile=mainfrm.h
ImplementationFile=mainfrm.cpp
-Filter=T
-VirtualFilter=fWC
-LastObject=CMainFrame
-
-[CLS:CMapCommentDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=MapCommentDlg.h
-ImplementationFile=MapCommentDlg.cpp
-
-[CLS:CMapDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=MapDlg.h
-ImplementationFile=MapDlg.cpp
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CMapMoveDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=MapMoveDlg.h
-ImplementationFile=MapMoveDlg.cpp
-[CLS:CMissingEntryPoints]
+[CLS:CMDITabs]
Type=0
-BaseClass=CDialog
-HeaderFile=MissingEntryPoints.h
-ImplementationFile=MissingEntryPoints.cpp
+BaseClass=CTabCtrl
+HeaderFile=MDITabs.h
+ImplementationFile=MDITabs.cpp
[CLS:CMUSHclientApp]
Type=0
BaseClass=CWinApp
HeaderFile=MUSHclient.h
ImplementationFile=MUSHclient.cpp
-Filter=N
-VirtualFilter=AC
-LastObject=CMUSHclientApp
[CLS:CAboutDlg]
Type=0
@@ -523,542 +91,48 @@ BaseClass=CDialog
HeaderFile=MUSHclient.cpp
ImplementationFile=MUSHclient.cpp
LastObject=CAboutDlg
-Filter=D
-VirtualFilter=dWC
[CLS:CMUSHView]
Type=0
BaseClass=CView
HeaderFile=mushview.h
ImplementationFile=mushview.cpp
-LastObject=CMUSHView
-Filter=C
-VirtualFilter=VWC
-
-[CLS:CMXPscriptRoutinesDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=MXPscriptRoutinesDlg.h
-ImplementationFile=MXPscriptRoutinesDlg.cpp
-LastObject=CMXPscriptRoutinesDlg
[CLS:CMySplitterWnd]
Type=0
BaseClass=CSplitterWnd
HeaderFile=MySplitterWnd.h
ImplementationFile=MySplitterWnd.cpp
-LastObject=CMySplitterWnd
-
-[CLS:CPasswordDialog]
-Type=0
-BaseClass=CDialog
-HeaderFile=password.h
-ImplementationFile=password.cpp
-LastObject=CPasswordDialog
-
-[CLS:CPluginsDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=PluginsDlg.h
-ImplementationFile=PluginsDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=CPluginsDlg
-
-[CLS:CPluginWizardPage1]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage1
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CPluginWizardPage2]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage2
-
-[CLS:CPluginWizardPage3]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage3
-
-[CLS:CPluginWizardPage4]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage4
-
-[CLS:CPluginWizardPage5]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage5
-
-[CLS:CPluginWizardPage6]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage6
-
-[CLS:CPluginWizardPage7]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage7
-
-[CLS:CPluginWizardPage8]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=PluginWizard.h
-ImplementationFile=PluginWizard.cpp
-LastObject=CPluginWizardPage8
-
-[CLS:CPluginWizardSheet]
-Type=0
-BaseClass=CPropertySheet
-HeaderFile=PluginWizardSheet.h
-ImplementationFile=PluginWizardSheet.cpp
-LastObject=CPluginWizardSheet
-
-[CLS:CPrefsP1]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP1
-
-[CLS:CPrefsP2]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-
-[CLS:CPrefsP3]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP3
-
-[CLS:CPrefsP4]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-
-[CLS:CPrefsP5]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CPrefsP6]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-LastObject=IDC_MACROS_LIST
-
-[CLS:CPrefsP7]
-Type=0
-BaseClass=CGenPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=IDC_ALIASES_LIST
-
-[CLS:CPrefsP8]
-Type=0
-BaseClass=CGenPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP8
-
-[CLS:CPrefsP9]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP9
-
-[CLS:CPrefsP10]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-LastObject=CPrefsP10
-
-[CLS:CPrefsP11]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CPrefsP12]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=IDC_CONTROL_KEY
-
-[CLS:CPrefsP13]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-
-[CLS:CPrefsP14]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP14
-
-[CLS:CPrefsP15]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-LastObject=CPrefsP15
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CPrefsP16]
-Type=0
-BaseClass=CGenPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP16
-
-[CLS:CPrefsP17]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-LastObject=CPrefsP17
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CPrefsP18]
-Type=0
-BaseClass=CGenPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP18
-
-[CLS:CPrefsP19]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-Filter=D
-VirtualFilter=idWC
-
-[CLS:CPrefsP20]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-
-[CLS:CPrefsP21]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-
-[CLS:CPrefsP0]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-LastObject=CPrefsP0
-
-[CLS:CPrefsP22]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-
-[CLS:CPrefsP23]
-Type=0
-HeaderFile=prefspropertypages.h
-ImplementationFile=prefspropertypages.cpp
-BaseClass=CPropertyPage
-Filter=D
-VirtualFilter=idWC
-LastObject=CPrefsP23
-
-[CLS:CPrefsPropertySheet]
-Type=0
-BaseClass=CPropertySheet
-HeaderFile=PrefsPropertySheet.h
-ImplementationFile=PrefsPropertySheet.cpp
-Filter=W
-VirtualFilter=hWC
-LastObject=CPrefsPropertySheet
-
-[CLS:CProgressDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=ProgDlg.h
-ImplementationFile=ProgDlg.cpp
-[CLS:CQuickConnectDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=QuickConnectDlg.h
-ImplementationFile=QuickConnectDlg.cpp
-
-[CLS:CRecallDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=RecallDlg.h
-ImplementationFile=RecallDlg.cpp
-LastObject=IDC_TEXT
-
-[CLS:CRecallSearchDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=RecallSearchDlg.h
-ImplementationFile=RecallSearchDlg.cpp
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CRegistrationPropertyPage1]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-LastObject=IDC_ORDERS_WEB_PAGE
-
-[CLS:CRegistrationPropertyPage2]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage3]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage4]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage5]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage6]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage7]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage8]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage9]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage10]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage11]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage12]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage13]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage14]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage15]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage16]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertyPage17]
-Type=0
-BaseClass=CPropertyPage
-HeaderFile=registrationpropertypages.h
-ImplementationFile=RegistrationPropertyPages.cpp
-
-[CLS:CRegistrationPropertySheet]
-Type=0
-BaseClass=CPropertySheet
-HeaderFile=RegistrationPropertySheet.h
-ImplementationFile=RegistrationPropertySheet.cpp
-
-[CLS:CScriptErrorDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=ScriptErrorDlg.h
-ImplementationFile=ScriptErrorDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=ID_POPUP_HELP
-
-[CLS:CSendToAllDlg]
+[CLS:CMyStatusBar]
Type=0
-BaseClass=CDialog
-HeaderFile=SendToAllDlg.h
-ImplementationFile=SendToAllDlg.cpp
+BaseClass=CStatusBar
+HeaderFile=MyStatusBar.h
+ImplementationFile=MyStatusBar.cpp
[CLS:CSendView]
Type=0
BaseClass=CEditView
HeaderFile=sendvw.h
ImplementationFile=sendvw.cpp
-LastObject=CSendView
-Filter=C
-VirtualFilter=VWC
-
-[CLS:CSplashWnd]
-Type=0
-BaseClass=CWnd
-HeaderFile=Splash.h
-ImplementationFile=Splash.cpp
-
-[CLS:CTabDefaultsDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=TabDefaultsDlg.h
-ImplementationFile=TabDefaultsDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=CTabDefaultsDlg
-
-[CLS:CTestCommandDialog]
-Type=0
-BaseClass=CDialog
-HeaderFile=testcomm.h
-ImplementationFile=testcomm.cpp
-
-[CLS:CTestResultDialog]
-Type=0
-BaseClass=CDialog
-HeaderFile=testrslt.h
-ImplementationFile=testrslt.cpp
-
-[CLS:CTextAttributesDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=TextAttributesDlg.h
-ImplementationFile=TextAttributesDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_RGB_TEXT_SWATCH
[CLS:CTextChildFrame]
Type=0
BaseClass=CMDIChildWnd
HeaderFile=textchildfrm.h
ImplementationFile=textchildfrm.cpp
-Filter=M
-VirtualFilter=mfWC
-LastObject=CTextChildFrame
[CLS:CTextDocument]
Type=0
BaseClass=CDocument
HeaderFile=TextDocument.h
ImplementationFile=TextDocument.cpp
-LastObject=ID_EDIT_GOTO
-Filter=N
-VirtualFilter=DC
[CLS:CTextView]
Type=0
BaseClass=CEditView
HeaderFile=TextView.h
ImplementationFile=TextView.cpp
-Filter=C
-VirtualFilter=VWC
-LastObject=IDC_WORD_LIST
-
-[CLS:CTimerDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=TimerDlg.h
-ImplementationFile=TimerDlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_AT_SECOND
[CLS:CTimerWnd]
Type=0
@@ -1066,321 +140,17 @@ BaseClass=CWnd
HeaderFile=TimerWnd.h
ImplementationFile=TimerWnd.cpp
-[CLS:CTipDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=TipDlg.h
-ImplementationFile=TipDlg.cpp
-
-[CLS:CTreePropertySheet]
-Type=0
-BaseClass=CPropertySheet
-HeaderFile=TreePropertySheet.h
-ImplementationFile=TreePropertySheet.cpp
-
-[CLS:CTriggerDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=triggdlg.h
-ImplementationFile=triggdlg.cpp
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_REGEXP_ERROR
-
-[CLS:CTriggerTestDialog]
-Type=0
-BaseClass=CDialog
-HeaderFile=trigtest.h
-ImplementationFile=trigtest.cpp
-
-[CLS:CWelcomeDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=welcome.h
-ImplementationFile=welcome.cpp
-LastObject=CWelcomeDlg
-
-[CLS:CWelcome1Dlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=welcome1.h
-ImplementationFile=welcome1.cpp
-
-[CLS:CWinsockInfoDlg]
-Type=0
-BaseClass=CDialog
-HeaderFile=WinsockInfoDlg.h
-ImplementationFile=WinsockInfoDlg.cpp
-
-[CLS:CWorldConfiguration]
+[CLS:UDPsocket]
Type=0
-BaseClass=CDialog
-HeaderFile=WorldConfiguration.h
-ImplementationFile=WorldConfiguration.cpp
-
-[DLG:IDD_GOATS_BLOOD]
-Type=1
-Class=CEasterEggDlg
+BaseClass=CAsyncSocket
+HeaderFile=UDPsocket.h
+ImplementationFile=UDPsocket.cpp
[DLG:AFX_IDD_PRINTDLG]
Type=1
Class=CPrintingDialog
-[DLG:IDD_SELECT_GLOBAL_CONFIGURATION]
+[DLG:IDD_ABOUTBOX]
Type=1
-Class=CGlobalConfigurationDlg
-
-[CLS:CChatListDlg]
-Type=0
-HeaderFile=ChatListDlg.h
-ImplementationFile=ChatListDlg.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=IDC_CHAT_SESSIONS
-VirtualFilter=dWC
-
-[CLS:CChatCallDlg]
-Type=0
-HeaderFile=ChatCallDlg.h
-ImplementationFile=ChatCallDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CChatCallDlg
-
-[CLS:CChatToAllDlg]
-Type=0
-HeaderFile=ChatToAllDlg.h
-ImplementationFile=ChatToAllDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CChatToAllDlg
-
-[CLS:CEmoteToAllDlg]
-Type=0
-HeaderFile=EmoteToAllDlg.h
-ImplementationFile=EmoteToAllDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CEmoteToAllDlg
-
-[CLS:CChatDetailsDlg]
-Type=0
-HeaderFile=ChatDetailsDlg.h
-ImplementationFile=ChatDetailsDlg.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=IDC_ACTUAL_IP
-VirtualFilter=dWC
-
-[CLS:CProxyServerPasswordDlg]
-Type=0
-HeaderFile=ProxyServerPasswordDlg.h
-ImplementationFile=ProxyServerPasswordDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CGlobalPrefsP11]
-Type=0
-HeaderFile=globalprefs.h
-ImplementationFile=globalprefs.cpp
-BaseClass=CPropertyPage
-Filter=D
-LastObject=IDC_MUSHCLIENT_ICON
-VirtualFilter=idWC
-
-[CLS:CMyStatusBar]
-Type=0
-HeaderFile=MyStatusBar.h
-ImplementationFile=MyStatusBar.cpp
-BaseClass=CStatusBar
-Filter=W
-LastObject=CMyStatusBar
-
-[CLS:CGlobalPrefsP12]
-Type=0
-HeaderFile=globalprefs.h
-ImplementationFile=globalprefs.cpp
-BaseClass=CPropertyPage
-Filter=D
-LastObject=CGlobalPrefsP12
-VirtualFilter=idWC
-
-[CLS:CRegexpProblemDlg]
-Type=0
-HeaderFile=RegexpProblemDlg.h
-ImplementationFile=RegexpProblemDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_REGEXP_TEXT
-
-[CLS:CPaneView]
-Type=0
-HeaderFile=PaneView.h
-ImplementationFile=PaneView.cpp
-BaseClass=CView
-Filter=C
-LastObject=CPaneView
-VirtualFilter=VWC
-
-[CLS:CPaneChildWnd]
-Type=0
-HeaderFile=PaneChildWnd.h
-ImplementationFile=PaneChildWnd.cpp
-BaseClass=CMDIChildWnd
-Filter=M
-LastObject=CPaneChildWnd
-
-[CLS:CGlobalPrefsP13]
-Type=0
-HeaderFile=globalprefs.h
-ImplementationFile=globalprefs.cpp
-BaseClass=CPropertyPage
-Filter=D
-VirtualFilter=idWC
-LastObject=CGlobalPrefsP13
-
-[CLS:UDPsocket]
-Type=0
-HeaderFile=UDPsocket.h
-ImplementationFile=UDPsocket.cpp
-BaseClass=CAsyncSocket
-Filter=N
-LastObject=ID_ACTIONS_QUIT
-
-[CLS:CRegisterMUSHclient]
-Type=0
-HeaderFile=RegisterMUSHclient.h
-ImplementationFile=RegisterMUSHclient.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=CRegisterMUSHclient
-VirtualFilter=dWC
-
-[CLS:CHighlightPhraseDlg]
-Type=0
-HeaderFile=HighlightPhraseDlg.h
-ImplementationFile=HighlightPhraseDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=IDC_HIGHLIGHT_TEXT
-
-[CLS:CUniqueIDDlg]
-Type=0
-HeaderFile=UniqueIDDlg.h
-ImplementationFile=UniqueIDDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-
-[CLS:CMultiLineTriggerDlg]
-Type=0
-HeaderFile=MultiLineTriggerDlg.h
-ImplementationFile=MultiLineTriggerDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CMultiLineTriggerDlg
-
-[CLS:CLuaInputBox]
-Type=0
-HeaderFile=LuaInputBox.h
-ImplementationFile=LuaInputBox.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CLuaInputBox
-
-[CLS:CLuaChooseBox]
-Type=0
-HeaderFile=LuaChooseBox.h
-ImplementationFile=LuaChooseBox.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=CLuaChooseBox
-VirtualFilter=dWC
-
-[CLS:CLuaChooseList]
-Type=0
-HeaderFile=LuaChooseList.h
-ImplementationFile=LuaChooseList.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=CLuaChooseList
-VirtualFilter=dWC
-
-[CLS:CFunctionListDlg]
-Type=0
-HeaderFile=dialogs\functionlistdlg.h
-ImplementationFile=dialogs\functionlistdlg.cpp
-BaseClass=CDialog
-LastObject=CFunctionListDlg
-
-[CLS:CLuaGsubDlg]
-Type=0
-HeaderFile=LuaGsubDlg.h
-ImplementationFile=LuaGsubDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CLuaGsubDlg
-
-[CLS:CCompleteWordDlg]
-Type=0
-HeaderFile=CompleteWordDlg.h
-ImplementationFile=CompleteWordDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CCompleteWordDlg
-
-[CLS:CKeyNameDlg]
-Type=0
-HeaderFile=KeyNameDlg.h
-ImplementationFile=KeyNameDlg.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=CKeyNameDlg
-VirtualFilter=dWC
-
-[CLS:CLuaChooseListMulti]
-Type=0
-HeaderFile=LuaChooseListMulti.h
-ImplementationFile=LuaChooseListMulti.cpp
-BaseClass=CDialog
-Filter=D
-LastObject=IDC_CHOOSE_LIST
-VirtualFilter=dWC
-
-[CLS:CDebugLuaDlg]
-Type=0
-HeaderFile=DebugLuaDlg.h
-ImplementationFile=DebugLuaDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CDebugLuaDlg
-
-[CLS:CSpellCheckDlg]
-Type=0
-HeaderFile=SpellCheckDlg.h
-ImplementationFile=SpellCheckDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CSpellCheckDlg
-
-[CLS:CInsertUnicodeDlg]
-Type=0
-HeaderFile=InsertUnicodeDlg.h
-ImplementationFile=InsertUnicodeDlg.cpp
-BaseClass=CDialog
-Filter=D
-VirtualFilter=dWC
-LastObject=CInsertUnicodeDlg
+Class=CAboutDlg
View
79 mushview.cpp
@@ -2945,21 +2945,7 @@ CSize sizeTotal (pDoc->m_nWrapColumn * pDoc->m_FontWidth, lastline * pDoc->m_Fon
Frame.FixUpTitleBar (); // in case we need to add the mud name to the title bar
- // tell each plugin we have resized. Hello, Worstje!
-
- for (POSITION pluginpos = pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = pDoc->m_PluginList.GetNext (pluginpos);
-
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_WORLD_OUTPUT_RESIZED,
- pPlugin->m_dispid_plugin_on_world_output_resized);
-
- } // end of doing each plugin
+ pDoc->SendToAllPluginCallbacks (ON_PLUGIN_WORLD_OUTPUT_RESIZED);
// this is for the guy that wants to fit the max text he can in his window,
@@ -3170,27 +3156,7 @@ ASSERT_VALID(pDoc);
} // end of executing get focus script
if (!pDoc->m_bWorldClosing)
- {
-
- // now do plugins "get focus"
- CPlugin * pSavedPlugin = pDoc->m_CurrentPlugin;
- pDoc->m_CurrentPlugin = NULL;
-
- // tell each plugin what we have received
- for (POSITION pluginpos = pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_GETFOCUS, pPlugin->m_dispid_plugin_get_focus);
- } // end of doing each plugin
-
- pDoc->m_CurrentPlugin = pSavedPlugin;
-
- } // end of world not closing
+ pDoc->SendToAllPluginCallbacks (ON_PLUGIN_GETFOCUS);
} // end of executing "get focus" scripts
// make sure status line is updated
@@ -3223,25 +3189,8 @@ ASSERT_VALID(pDoc);
} // end of executing lose focus script
if (!pDoc->m_bWorldClosing)
- {
- // now do plugins "lose focus"
- CPlugin * pSavedPlugin = pDoc->m_CurrentPlugin;
- pDoc->m_CurrentPlugin = NULL;
-
- // tell each plugin what we have received
- for (POSITION pluginpos = pDoc->m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = pDoc->m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_LOSEFOCUS, pPlugin->m_dispid_plugin_lose_focus);
- } // end of doing each plugin
+ pDoc->SendToAllPluginCallbacks (ON_PLUGIN_LOSEFOCUS);
- pDoc->m_CurrentPlugin = pSavedPlugin;
- } // end of world not closing
} // end of executing "Lose focus" scripts
// make sure status line is updated
Frame.SetStatusNormal ();
@@ -6372,22 +6321,12 @@ bool CMUSHView::Mouse_Move_MiniWindow (CMUSHclientDoc* pDoc, CPoint point)
// report mouse movements: version 4.45
pDoc->m_lastMousePosition = point;
- CPlugin * pSavedPlugin = pDoc->m_CurrentPlugin;
- pDoc->m_CurrentPlugin = NULL;
-
- // tell each plugin about the mouse movement
- for (POSITION pos = pDoc->m_PluginList.GetHeadPosition(); pos; )
- {
- CPlugin * pPlugin = pDoc->m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- pPlugin->ExecutePluginScript (ON_PLUGIN_MOUSE_MOVED,
- pPlugin->m_dispid_plugin_mouse_moved, point.x, point.y, sMiniWindowId.c_str ());
- } // end of doing each plugin
-
- pDoc->m_CurrentPlugin = pSavedPlugin;
+ pDoc->SendToAllPluginCallbacks (ON_PLUGIN_MOUSE_MOVED,
+ point.x,
+ point.y,
+ sMiniWindowId.c_str (),
+ false,
+ false);
// drag-and-drop stuff
View
52 mxp/mxpClose.cpp
@@ -177,23 +177,11 @@ bool bHaveVariable = false;
} // not Lua
} // end of script callback wanted
- // tell each plugin about the close tag
- if (m_bPluginProcessesCloseTag)
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_CLOSETAG,
- pPlugin->m_dispid_plugin_OnMXP_CloseTag,
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_CLOSETAG,
CFormat ("%s,%s",
(LPCTSTR) strTag,
- (LPCTSTR) strText)
- );
- } // end of doing each plugin
+ (LPCTSTR) strText));
+
m_CurrentPlugin = NULL;
// if this tag had a FLAG directive, set the desired variable - prefixed with mxp_
@@ -287,45 +275,21 @@ bool bHaveVariable = false;
// tell each plugin what we have received
if (m_bPluginProcessesSetVariable)
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_SETVARIABLE,
- pPlugin->m_dispid_plugin_OnMXP_SetVariable,
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_SETVARIABLE,
CFormat ("%s=%s",
(LPCTSTR) strVariable,
- (LPCTSTR) strText)
- );
- } // end of doing each plugin
- m_CurrentPlugin = NULL;
-
+ (LPCTSTR) strText));
+
if (strTag == "var"|| strTag == "v") // add entity to map
{
m_CustomEntityMap.SetAt (strVariable, strText);
// tell each plugin what we have received
if (m_bPluginProcessesSetEntity)
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_SETENTITY,
- pPlugin->m_dispid_plugin_OnMXP_SetEntity,
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_SETENTITY,
CFormat ("%s=%s",
(LPCTSTR) strVariable,
- (LPCTSTR) strText)
- );
- } // end of doing each plugin
- m_CurrentPlugin = NULL;
+ (LPCTSTR) strText));
}
View
20 mxp/mxpDefs.cpp
@@ -453,21 +453,11 @@ void CMUSHclientDoc::MXP_Entity (CString strName, CString strTag)
// tell each plugin what we have received
if (m_bPluginProcessesSetEntity)
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_SETENTITY,
- pPlugin->m_dispid_plugin_OnMXP_SetEntity,
- CFormat ("%s=%s",
- (LPCTSTR) strName,
- (LPCTSTR) strFixedValue)
- );
- } // end of doing each plugin
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_SETENTITY,
+ CFormat ("%s=%s",
+ (LPCTSTR) strName,
+ (LPCTSTR) strFixedValue));
+
m_CurrentPlugin = NULL;
}
View
25 mxp/mxpError.cpp
@@ -118,24 +118,13 @@ char * p = "?";
// tell each plugin about the error tag
if (m_bPluginProcessesError)
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_ERROR,
- pPlugin->m_dispid_plugin_OnMXP_Error,
- CFormat ("%s,%ld,%ld,%s",
- (LPCTSTR) p,
- iMessageNumber,
- (long) m_LineList.GetCount (),
- (LPCTSTR) strMessage)
- );
- } // end of doing each plugin
- m_CurrentPlugin = NULL;
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_ERROR,
+ CFormat ("%s,%ld,%ld,%s",
+ (LPCTSTR) p,
+ iMessageNumber,
+ (long) m_LineList.GetCount (),
+ (LPCTSTR) strMessage));
+
CString strTitle = MXP_ERROR_WINDOW;
strTitle += " - ";
View
23 mxp/mxpOnOff.cpp
@@ -80,17 +80,7 @@ void CMUSHclientDoc::MXP_Off (const bool bCompletely)
nInvocationCount);
}
} // end of executing close script
-
- // tell each plugin we have connected
- for (POSITION pos = m_PluginList.GetHeadPosition(); pos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_STOP, pPlugin->m_dispid_plugin_OnMXP_Stop);
- } // end of doing each plugin
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_STOP);
} // end of turn MXP off completely
} // end of CMUSHclientDoc::MXP_Off
@@ -127,16 +117,7 @@ void CMUSHclientDoc::MXP_On (const bool bPueblo, const bool bManual)
}
} // end of executing open script
- // tell each plugin MXP is starting
- for (POSITION pos = m_PluginList.GetHeadPosition(); pos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_START, pPlugin->m_dispid_plugin_OnMXP_Start);
- } // end of doing each plugin
+ SendToAllPluginCallbacks (ON_PLUGIN_MXP_START);
m_bMXP = true;
m_bPuebloActive = bPueblo;
View
26 mxp/mxpStart.cpp
@@ -547,27 +547,13 @@ bool CMUSHclientDoc::MXP_StartTagScript (const CString & strName,
if (strName == "afk")
return false;
- // tell each plugin what we have received
- for (POSITION pluginpos = m_PluginList.GetHeadPosition(); pluginpos; )
- {
- CPlugin * pPlugin = m_PluginList.GetNext (pluginpos);
-
- if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
- continue;
-
- // see what the plugin makes of this,
- if (!pPlugin->ExecutePluginScript (ON_PLUGIN_MXP_OPENTAG,
- pPlugin->m_dispid_plugin_OnMXP_OpenTag,
- CFormat ("%s,%s",
- (LPCTSTR) strName,
- (LPCTSTR) strArguments)
- ))
- {
- m_CurrentPlugin = NULL;
+ if (!SendToAllPluginCallbacks (ON_PLUGIN_MXP_OPENTAG,
+ CFormat ("%s,%s",
+ (LPCTSTR) strName,
+ (LPCTSTR) strArguments)
+ ), true)
return true;
- }
- } // end of doing each plugin
- m_CurrentPlugin = NULL;
+
// see if main script wants to do anything
if (m_dispidOnMXP_OpenTag == DISPID_UNKNOWN)
View
74 plugins.cpp
@@ -28,60 +28,13 @@ CPlugin::CPlugin (CMUSHclientDoc * pDoc)
m_bGlobal = false;
m_iLoadOrder = 0;
- // no dispatch IDs yet
- m_dispid_plugin_install = DISPID_UNKNOWN;
- m_dispid_plugin_connect = DISPID_UNKNOWN;
- m_dispid_plugin_disconnect = DISPID_UNKNOWN;
- m_dispid_plugin_close = DISPID_UNKNOWN;
- m_dispid_plugin_save_state = DISPID_UNKNOWN;
- m_dispid_plugin_world_save = DISPID_UNKNOWN;
- m_dispid_plugin_enable = DISPID_UNKNOWN;
- m_dispid_plugin_disable = DISPID_UNKNOWN;
- m_dispid_plugin_command = DISPID_UNKNOWN;
- m_dispid_plugin_command_entered = DISPID_UNKNOWN;
- m_dispid_plugin_get_focus = DISPID_UNKNOWN;
- m_dispid_plugin_lose_focus = DISPID_UNKNOWN;
- m_dispid_plugin_trace = DISPID_UNKNOWN;
- m_dispid_plugin_broadcast = DISPID_UNKNOWN;
- m_dispid_plugin_screendraw = DISPID_UNKNOWN;
- m_dispid_plugin_playsound = DISPID_UNKNOWN;
- m_dispid_plugin_tabcomplete = DISPID_UNKNOWN;
-// m_dispid_plugin_tooltip = DISPID_UNKNOWN;
- m_dispid_plugin_tick = DISPID_UNKNOWN;
- m_dispid_plugin_mouse_moved = DISPID_UNKNOWN;
-
- m_dispid_plugin_send = DISPID_UNKNOWN;
- m_dispid_plugin_sent = DISPID_UNKNOWN;
- m_dispid_plugin_line_received = DISPID_UNKNOWN;
- m_dispid_plugin_packet_received= DISPID_UNKNOWN;
- m_dispid_plugin_telnet_option = DISPID_UNKNOWN;
- m_dispid_plugin_telnet_request = DISPID_UNKNOWN;
- m_dispid_plugin_telnet_subnegotiation = DISPID_UNKNOWN;
- m_dispid_plugin_IAC_GA = DISPID_UNKNOWN;
- m_dispid_plugin_partial_line = DISPID_UNKNOWN;
- m_dispid_plugin_on_world_output_resized = DISPID_UNKNOWN;
- m_dispid_plugin_on_command_changed = DISPID_UNKNOWN;
-
- m_dispid_plugin_OnMXP_Start = DISPID_UNKNOWN;
- m_dispid_plugin_OnMXP_Stop = DISPID_UNKNOWN;
- m_dispid_plugin_OnMXP_OpenTag = DISPID_UNKNOWN;
- m_dispid_plugin_OnMXP_CloseTag = DISPID_UNKNOWN;
- m_dispid_plugin_OnMXP_SetVariable = DISPID_UNKNOWN;
- m_dispid_plugin_OnMXP_SetEntity = DISPID_UNKNOWN;
- m_dispid_plugin_OnMXP_Error = DISPID_UNKNOWN;
-
- m_dispid_plugin_On_Chat_Accept = DISPID_UNKNOWN;
- m_dispid_plugin_On_Chat_Message = DISPID_UNKNOWN;
- m_dispid_plugin_On_Chat_MessageOut = DISPID_UNKNOWN;
- m_dispid_plugin_On_Chat_Display = DISPID_UNKNOWN;
-
} // end of constructor
// destructor
CPlugin::~CPlugin ()
{
CPlugin * pSavedPlugin = m_pDoc->m_CurrentPlugin;
- ExecutePluginScript (ON_PLUGIN_CLOSE, m_dispid_plugin_close);
+ ExecutePluginScript (ON_PLUGIN_CLOSE);
m_pDoc->m_CurrentPlugin = pSavedPlugin;
SaveState ();
@@ -113,9 +66,11 @@ DISPID CPlugin::GetPluginDispid (const char * sName)
} // end of CPlugin::GetPluginDispid
-void CPlugin::ExecutePluginScript (const char * sName, DISPID & iRoutine)
+void CPlugin::ExecutePluginScript (const char * sName)
{
+ DISPID & iRoutine = m_PluginCallbacks [sName];
+
if (m_ScriptEngine && iRoutine != DISPID_UNKNOWN)
{
// do this so plugin can find its own state (eg. with GetPluginID)
@@ -162,9 +117,9 @@ void CPlugin::ExecutePluginScript (const char * sName, DISPID & iRoutine)
bool CPlugin::ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const char * sText)
{
+ DISPID & iRoutine = m_PluginCallbacks [sName];
if (m_ScriptEngine && iRoutine != DISPID_UNKNOWN)
{
@@ -248,10 +203,11 @@ bool CPlugin::ExecutePluginScript (const char * sName,
} // end of CPlugin::ExecutePluginScript
bool CPlugin::ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const long arg1,
const string sText)
{
+ DISPID & iRoutine = m_PluginCallbacks [sName];
+
if (m_ScriptEngine && iRoutine != DISPID_UNKNOWN)
{
// do this so plugin can find its own state (eg. with GetPluginID)
@@ -343,11 +299,12 @@ bool CPlugin::ExecutePluginScript (const char * sName,
} // end of CPlugin::ExecutePluginScript
bool CPlugin::ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const long arg1,
const long arg2,
const string sText)
{
+ DISPID & iRoutine = m_PluginCallbacks [sName];
+
if (m_ScriptEngine && iRoutine != DISPID_UNKNOWN)
{
long nInvocationCount = 0;
@@ -436,12 +393,13 @@ bool CPlugin::ExecutePluginScript (const char * sName,
bool CPlugin::ExecutePluginScript (const char * sName,
- DISPID & iRoutine,
const long arg1,
const char * arg2,
const char * arg3,