File tree Expand file tree Collapse file tree 3 files changed +27
-17
lines changed Expand file tree Collapse file tree 3 files changed +27
-17
lines changed Original file line number Diff line number Diff line change @@ -5691,17 +5691,21 @@ COleDateTime tNow = COleDateTime::GetCurrentTime();
5691
5691
CString strTitle = " Packet debug - " ;
5692
5692
strTitle += m_mush_name;
5693
5693
5694
- AppendToTheNotepad (strTitle,
5695
- TFormat (" %s%s packet: %I64d (%i bytes) at %s%s%s" ,
5696
- ENDLINE,
5697
- sCaption ,
5698
- iNumber,
5699
- size,
5700
- (LPCTSTR) strTime,
5701
- ENDLINE,
5702
- ENDLINE),
5703
- false , // append
5704
- eNotepadPacketDebug);
5694
+
5695
+ CString strMsg = TFormat (" %s%s packet: %I64d (%i bytes) at %s%s%s" ,
5696
+ ENDLINE,
5697
+ sCaption ,
5698
+ iNumber,
5699
+ size,
5700
+ (LPCTSTR) strTime,
5701
+ ENDLINE,
5702
+ ENDLINE);
5703
+
5704
+ if (!SendToFirstPluginCallbacks (ON_PLUGIN_PACKET_DEBUG, strMsg))
5705
+ AppendToTheNotepad (strTitle,
5706
+ strMsg,
5707
+ false , // append
5708
+ eNotepadPacketDebug);
5705
5709
5706
5710
// keep going until we have displayed it all
5707
5711
while (size > 0 )
@@ -5725,14 +5729,17 @@ COleDateTime tNow = COleDateTime::GetCurrentTime();
5725
5729
*pa = 0 ;
5726
5730
*ph = 0 ;
5727
5731
5728
- AppendToTheNotepad (strTitle,
5729
- CFormat (" %-*s %s%s" ,
5732
+ strMsg = CFormat (" %-*s %s%s" ,
5730
5733
MAX_DEBUG_CHARS,
5731
5734
asciibuf,
5732
5735
hexbuf,
5733
- ENDLINE),
5734
- false , // append
5735
- eNotepadPacketDebug);
5736
+ ENDLINE);
5737
+
5738
+ if (!SendToFirstPluginCallbacks (ON_PLUGIN_PACKET_DEBUG, strMsg))
5739
+ AppendToTheNotepad (strTitle,
5740
+ strMsg,
5741
+ false , // append
5742
+ eNotepadPacketDebug);
5736
5743
}
5737
5744
5738
5745
} // end of CMUSHclientDoc::Debug_Packets
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const string ON_PLUGIN_LOSEFOCUS ("OnPluginLoseFocus");
40
40
41
41
// capture stuff
42
42
const string ON_PLUGIN_TRACE (" OnPluginTrace" );
43
+ const string ON_PLUGIN_PACKET_DEBUG (" OnPluginPacketDebug" );
43
44
const string ON_PLUGIN_BROADCAST (" OnPluginBroadcast" );
44
45
const string ON_PLUGIN_SCREENDRAW (" OnPluginScreendraw" );
45
46
const string ON_PLUGIN_SELECTION_CHANGED (" OnPluginSelectionChanged" );
@@ -143,7 +144,8 @@ string PluginCallbacksNames [] = {
143
144
ON_PLUGIN_TELNET_SUBNEGOTIATION,
144
145
145
146
ON_PLUGIN_TICK,
146
- ON_PLUGIN_TRACE,
147
+ ON_PLUGIN_TRACE,
148
+ ON_PLUGIN_PACKET_DEBUG,
147
149
ON_PLUGIN_WORLD_OUTPUT_RESIZED,
148
150
ON_PLUGIN_WORLD_SAVE,
149
151
Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ extern const string ON_PLUGIN_LOSEFOCUS; // "OnPluginLoseFocus"
188
188
189
189
// capture stuff
190
190
extern const string ON_PLUGIN_TRACE; // "OnPluginTrace"
191
+ extern const string ON_PLUGIN_PACKET_DEBUG; // "OnPluginPacketDebug"
191
192
extern const string ON_PLUGIN_BROADCAST; // "OnPluginBroadcast"
192
193
extern const string ON_PLUGIN_SCREENDRAW; // "OnPluginScreendraw"
193
194
extern const string ON_PLUGIN_SELECTION_CHANGED; // "OnPluginSelectionChanged"
You can’t perform that action at this time.
0 commit comments