forked from nickgammon/mushclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.cpp
7912 lines (6183 loc) · 252 KB
/
doc.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// doc.cpp : implementation of the CMUSHclientDoc class
//
#include "stdafx.h"
#include "MUSHclient.h"
#include <process.h>
// #define SHOW_ALL_COMMS // for debugging connecting and other obscure problems
#include "doc.h"
#include "MUSHview.h"
#include "mainfrm.h"
#include "childfrm.h"
#include "sendvw.h"
#include "TextView.h"
#include "TextDocument.h"
#include "dialogs\ChooseNotepadDlg.h"
#include "dialogs\DebugWorldInputDlg.h"
#include "dialogs\ImportXMLdlg.h"
#include "dialogs\plugins\PluginsDlg.h"
#include "dialogs\KeyNameDlg.h"
#include "dialogs\logdlg.h" // for logging session
#include "dialogs\RecallSearchDlg.h"
#include "dialogs\chat\ChatListDlg.h"
#include "dialogs\world_prefs\PrefsPropertySheet.h"
#include "dialogs\password.h"
#include "ActivityDoc.h"
#include "dialogs\ConfirmPreamble.h"
#include "dialogs\ProgDlg.h"
#include "genprint.h"
#include "scripting\errors.h"
#include "flags.h"
#include "png/png.h" // for version
#include <malloc.h>
UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
#ifdef _WIN32
#ifndef _UNICODE
//#include <strstrea.h>
#endif
#endif
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
#ifdef _DEBUG
// for documenting menus, accelerators
void ListAccelerators (CDocument * pDoc, const int iType);
void ListDialogs (void);
#endif
IMPLEMENT_DYNAMIC(CTimer, CObject)
IMPLEMENT_DYNAMIC(CTrigger, CObject)
IMPLEMENT_DYNAMIC(CAlias, CObject)
IMPLEMENT_DYNAMIC(CVariable, CObject)
extern bool bNamesRead;
extern char working_dir [_MAX_PATH];
// count number of documents open
int gdoccount = 0;
//#include <mstcpip.h>
// From: mstcpip.h
/* Argument structure for SIO_KEEPALIVE_VALS */
struct tcp_keepalive {
ULONG onoff;
ULONG keepalivetime;
ULONG keepaliveinterval;
};
//
// New WSAIoctl Options
//
#define SIO_RCVALL _WSAIOW(IOC_VENDOR,1)
#define SIO_RCVALL_MCAST _WSAIOW(IOC_VENDOR,2)
#define SIO_RCVALL_IGMPMCAST _WSAIOW(IOC_VENDOR,3)
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR,4)
#define SIO_ABSORB_RTRALERT _WSAIOW(IOC_VENDOR,5)
#define SIO_UCAST_IF _WSAIOW(IOC_VENDOR,6)
#define SIO_LIMIT_BROADCASTS _WSAIOW(IOC_VENDOR,7)
#define SIO_INDEX_BIND _WSAIOW(IOC_VENDOR,8)
#define SIO_INDEX_MCASTIF _WSAIOW(IOC_VENDOR,9)
#define SIO_INDEX_ADD_MCAST _WSAIOW(IOC_VENDOR,10)
#define SIO_INDEX_DEL_MCAST _WSAIOW(IOC_VENDOR,11)
// SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
#define SIO_RCVALL_MCAST_IF _WSAIOW(IOC_VENDOR,13)
#define SIO_RCVALL_IF _WSAIOW(IOC_VENDOR,14)
/////////////////////////////////////////////////////////////////////////////
// CMUSHclientDoc
IMPLEMENT_DYNCREATE(CMUSHclientDoc, CDocument)
BEGIN_MESSAGE_MAP(CMUSHclientDoc, CDocument)
//{{AFX_MSG_MAP(CMUSHclientDoc)
ON_COMMAND(ID_FILE_LOGSESSION, OnFileLogsession)
ON_UPDATE_COMMAND_UI(ID_FILE_LOGSESSION, OnUpdateFileLogsession)
ON_UPDATE_COMMAND_UI(ID_STATUSLINE_LINES, OnUpdateStatuslineLines)
ON_UPDATE_COMMAND_UI(ID_STATUSLINE_MUSHNAME, OnUpdateStatuslineMushname)
ON_COMMAND(ID_GAME_WRAPLINES, OnGameWraplines)
ON_UPDATE_COMMAND_UI(ID_GAME_WRAPLINES, OnUpdateGameWraplines)
ON_UPDATE_COMMAND_UI(ID_STATUSLINE_TIME, OnUpdateStatuslineTime)
ON_UPDATE_COMMAND_UI(ID_STATUSLINE_LOG, OnUpdateStatuslineLog)
ON_COMMAND(ID_GAME_PREFERENCES, OnGamePreferences)
ON_COMMAND(ID_GAME_PASTEFILE, OnGamePastefile)
ON_COMMAND(ID_CONNECTION_CONNECT, OnConnectionConnect)
ON_UPDATE_COMMAND_UI(ID_CONNECTION_CONNECT, OnUpdateConnectionConnect)
ON_COMMAND(ID_CONNECTION_DISCONNECT, OnConnectionDisconnect)
ON_UPDATE_COMMAND_UI(ID_CONNECTION_DISCONNECT, OnUpdateConnectionDisconnect)
ON_COMMAND(ID_EDIT_PASTETOMUSH, OnEditPastetomush)
ON_UPDATE_COMMAND_UI(ID_GAME_PASTEFILE, OnUpdateSessionOpen)
ON_UPDATE_COMMAND_UI(ID_EDIT_PASTETOMUSH, OnUpdateEditPastetomush)
ON_UPDATE_COMMAND_UI(ID_GAME_PREFERENCES, OnUpdateGamePreferences)
ON_COMMAND(ID_GAME_IMMEDIATE, OnGameImmediate)
ON_UPDATE_COMMAND_UI(ID_GAME_IMMEDIATE, OnUpdateGameImmediate)
ON_COMMAND(ID_GAME_AUTOSAY, OnGameAutosay)
ON_UPDATE_COMMAND_UI(ID_GAME_AUTOSAY, OnUpdateGameAutosay)
ON_COMMAND(ID_CONNECT_DISCONNECT, OnConnectDisconnect)
ON_UPDATE_COMMAND_UI(ID_CONNECT_DISCONNECT, OnUpdateConnectDisconnect)
ON_COMMAND(ID_GAME_RELOAD_SCRIPT_FILE, OnGameReloadScriptFile)
ON_UPDATE_COMMAND_UI(ID_GAME_RELOAD_SCRIPT_FILE, OnUpdateGameReloadScriptFile)
ON_COMMAND(ID_DISPLAY_CLEAR_OUTPUT, OnDisplayClearOutput)
ON_COMMAND(ID_GAME_CONFIGURE_MUDADDRESS, OnGameConfigureMudaddress)
ON_COMMAND(ID_GAME_CONFIGURE_NAME_AND_PASSWORD, OnGameConfigureNameAndPassword)
ON_COMMAND(ID_GAME_CONFIGURE_LOGGING, OnGameConfigureLogging)
ON_COMMAND(ID_GAME_CONFIGURE_INFO, OnGameConfigureInfo)
ON_COMMAND(ID_GAME_CONFIGURE_NOTES, OnGameConfigureNotes)
ON_COMMAND(ID_GAME_CONFIGURE_COLOURS, OnGameConfigureColours)
ON_COMMAND(ID_GAME_CONFIGURE_PRINTING, OnGameConfigurePrinting)
ON_COMMAND(ID_GAME_CONFIGURE_OUTPUT, OnGameConfigureOutput)
ON_COMMAND(ID_GAME_CONFIGURE_HIGHLIGHTING, OnGameConfigureHighlighting)
ON_COMMAND(ID_GAME_CONFIGURE_COMMANDS, OnGameConfigureCommands)
ON_COMMAND(ID_GAME_CONFIGURE_KEYPAD, OnGameConfigureKeypad)
ON_COMMAND(ID_GAME_CONFIGURE_MACROS, OnGameConfigureMacros)
ON_COMMAND(ID_GAME_CONFIGURE_AUTOSAY, OnGameConfigureAutosay)
ON_COMMAND(ID_GAME_CONFIGURE_PASTETOWORLD, OnGameConfigurePastetoworld)
ON_COMMAND(ID_GAME_CONFIGURE_SENDFILE, OnGameConfigureSendfile)
ON_COMMAND(ID_GAME_CONFIGURE_SCRIPTING, OnGameConfigureScripting)
ON_COMMAND(ID_GAME_CONFIGURE_VARIABLES, OnGameConfigureVariables)
ON_COMMAND(ID_GAME_CONFIGURE_TRIGGERS, OnGameConfigureTriggers)
ON_COMMAND(ID_GAME_CONFIGURE_ALIASES, OnGameConfigureAliases)
ON_COMMAND(ID_GAME_CONFIGURE_TIMERS, OnGameConfigureTimers)
ON_COMMAND(ID_GAME_RESETALLTIMERS, OnGameResetalltimers)
ON_UPDATE_COMMAND_UI(ID_GAME_RESETALLTIMERS, OnUpdateGameResetalltimers)
ON_COMMAND(ID_GAME_EDITSCRIPTFILE, OnGameEditscriptfile)
ON_UPDATE_COMMAND_UI(ID_GAME_EDITSCRIPTFILE, OnUpdateGameEditscriptfile)
ON_UPDATE_COMMAND_UI(ID_GAME_CONFIGURE_MUDADDRESS, OnUpdateGameConfigureMudaddress)
ON_COMMAND(ID_DISPLAY_RECALLTEXT, OnDisplayRecalltext)
ON_COMMAND(ID_GAME_CONFIGURE_CUSTOM_COLOURS, OnGameConfigureCustomColours)
ON_COMMAND(ID_FILE_RELOADDEFAULTS, OnFileReloaddefaults)
ON_UPDATE_COMMAND_UI(ID_FILE_RELOADDEFAULTS, OnUpdateFileReloaddefaults)
ON_COMMAND(ID_GAME_TRACE, OnGameTrace)
ON_UPDATE_COMMAND_UI(ID_GAME_TRACE, OnUpdateGameTrace)
ON_COMMAND(ID_EDIT_FLIPTONOTEPAD, OnEditFliptonotepad)
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
ON_COMMAND(ID_FILE_SAVE, OnFileSave)
ON_UPDATE_COMMAND_UI(ID_FILE_SAVE, OnUpdateFileSave)
ON_COMMAND(ID_FILE_SAVE_AS, OnFileSaveAs)
ON_UPDATE_COMMAND_UI(ID_FILE_SAVE_AS, OnUpdateFileSaveAs)
ON_COMMAND(ID_GAME_MAPPER, OnGameMapper)
ON_UPDATE_COMMAND_UI(ID_GAME_MAPPER, OnUpdateGameMapper)
ON_COMMAND(ID_INPUT_DISCARDQUEUEDCOMMANDS, OnInputDiscardqueuedcommands)
ON_UPDATE_COMMAND_UI(ID_INPUT_DISCARDQUEUEDCOMMANDS, OnUpdateInputDiscardqueuedcommands)
ON_COMMAND(ID_GAME_DOMAPPERSPECIAL, OnGameDomapperspecial)
ON_UPDATE_COMMAND_UI(ID_GAME_DOMAPPERSPECIAL, OnUpdateGameDomapperspecial)
ON_COMMAND(ID_FILE_PREFERENCES, OnFilePreferences)
ON_COMMAND(ID_DEBUG_WORLD_INPUT, OnDebugWorldInput)
ON_COMMAND(ID_DISPLAY_NOCOMMANDECHO, OnDisplayNocommandecho)
ON_UPDATE_COMMAND_UI(ID_DISPLAY_NOCOMMANDECHO, OnUpdateDisplayNocommandecho)
ON_COMMAND(ID_EDIT_DEBUGINCOMINGPACKETS, OnEditDebugincomingpackets)
ON_UPDATE_COMMAND_UI(ID_EDIT_DEBUGINCOMINGPACKETS, OnUpdateEditDebugincomingpackets)
ON_COMMAND(ID_GAME_CONFIGURE_MXPPUEBLO, OnGameConfigureMxppueblo)
ON_COMMAND(ID_FILE_IMPORT, OnFileImport)
ON_COMMAND(ID_FILE_PLUGINS, OnFilePlugins)
ON_COMMAND(ID_FILE_PLUGINWIZARD, OnFilePluginwizard)
ON_COMMAND(ID_GAME_DOMAPPERCOMMENT, OnGameDomappercomment)
ON_UPDATE_COMMAND_UI(ID_GAME_DOMAPPERCOMMENT, OnUpdateGameDomappercomment)
ON_COMMAND(ID_GAME_CHATSESSIONS, OnGameChatsessions)
ON_COMMAND(ID_GAME_CONFIGURE_CHAT, OnGameConfigureChat)
ON_COMMAND(ID_GAME_RESETCONNECTEDTIME, OnGameResetconnectedtime)
ON_COMMAND(ID_DISPLAY_STOPSOUNDPLAYING, OnDisplayStopsoundplaying)
ON_COMMAND(ID_INPUT_KEYNAME, OnInputKeyname)
ON_COMMAND(ID_EDIT_CONVERTCLIPBOARDFORUMCODES, OnEditConvertclipboardforumcodes)
//}}AFX_MSG_MAP
ON_UPDATE_COMMAND_UI_RANGE(0, 0xFFFF, OnFixMenus)
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CMUSHclientDoc, CDocument)
//{{AFX_DISPATCH_MAP(CMUSHclientDoc)
DISP_PROPERTY_NOTIFY(CMUSHclientDoc, "LogNotes", m_bLogNotes, OnLogNotesChanged, VT_I2)
DISP_PROPERTY_NOTIFY(CMUSHclientDoc, "LogInput", m_log_input, OnLogInputChanged, VT_I2)
DISP_PROPERTY_NOTIFY(CMUSHclientDoc, "LogOutput", m_bLogOutput, OnLogOutputChanged, VT_I2)
DISP_PROPERTY_NOTIFY(CMUSHclientDoc, "Mapping", m_bMapping, OnMappingChanged, VT_BOOL)
DISP_PROPERTY_NOTIFY(CMUSHclientDoc, "RemoveMapReverses", m_bRemoveMapReverses, OnRemoveMapReversesChanged, VT_BOOL)
DISP_PROPERTY_EX(CMUSHclientDoc, "NoteColour", GetNoteColour, SetNoteColour, VT_I2)
DISP_PROPERTY_EX(CMUSHclientDoc, "Trace", GetTrace, SetTrace, VT_BOOL)
DISP_PROPERTY_EX(CMUSHclientDoc, "SpeedWalkDelay", GetSpeedWalkDelay, SetSpeedWalkDelay, VT_I2)
DISP_PROPERTY_EX(CMUSHclientDoc, "NoteColourFore", GetNoteColourFore, SetNoteColourFore, VT_I4)
DISP_PROPERTY_EX(CMUSHclientDoc, "NoteColourBack", GetNoteColourBack, SetNoteColourBack, VT_I4)
DISP_PROPERTY_EX(CMUSHclientDoc, "EchoInput", GetEchoInput, SetEchoInput, VT_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetLineCount", GetLineCount, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "IsConnected", IsConnected, VT_BOOL, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "WorldName", WorldName, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Note", Note, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Send", Send, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Sound", Sound, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTrigger", DeleteTrigger, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AddTrigger", AddTrigger, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_I2 VTS_I2 VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "EnableTrigger", EnableTrigger, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetTrigger", GetTrigger, VT_I4, VTS_BSTR VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT)
DISP_FUNCTION(CMUSHclientDoc, "IsTrigger", IsTrigger, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetTriggerList", GetTriggerList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetVariable", GetVariable, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetVariable", SetVariable, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetVariableList", GetVariableList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Save", Save, VT_BOOL, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Connect", Connect, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Disconnect", Disconnect, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteAlias", DeleteAlias, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "EnableAlias", EnableAlias, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetAlias", GetAlias, VT_I4, VTS_BSTR VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT)
DISP_FUNCTION(CMUSHclientDoc, "GetAliasList", GetAliasList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "IsAlias", IsAlias, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "CloseLog", CloseLog, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "OpenLog", OpenLog, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "WriteLog", WriteLog, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "IsLogOpen", IsLogOpen, VT_BOOL, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "EnableTimer", EnableTimer, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "AddAlias", AddAlias, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteVariable", DeleteVariable, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ResetTimers", ResetTimers, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "SetStatus", SetStatus, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetCommand", SetCommand, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetNotes", GetNotes, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "SetNotes", SetNotes, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Redraw", Redraw, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ResetTimer", ResetTimer, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetOutputFont", SetOutputFont, VT_EMPTY, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SetInputFont", SetInputFont, VT_EMPTY, VTS_BSTR VTS_I2 VTS_I2 VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "SendToNotepad", SendToNotepad, VT_BOOL, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AppendToNotepad", AppendToNotepad, VT_BOOL, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ActivateNotepad", ActivateNotepad, VT_BOOL, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Activate", Activate, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetWorld", GetWorld, VT_DISPATCH, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetWorldList", GetWorldList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "FixupHTML", FixupHTML, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Replace", Replace, VT_BSTR, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "FixupEscapeSequences", FixupEscapeSequences, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Trim", Trim, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ReplaceNotepad", ReplaceNotepad, VT_BOOL, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetAliasInfo", GetAliasInfo, VT_VARIANT, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetTriggerInfo", GetTriggerInfo, VT_VARIANT, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "EvaluateSpeedwalk", EvaluateSpeedwalk, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ReverseSpeedwalk", ReverseSpeedwalk, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTimer", DeleteTimer, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "IsTimer", IsTimer, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetTimerList", GetTimerList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetTimer", GetTimer, VT_I4, VTS_BSTR VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT VTS_PVARIANT)
DISP_FUNCTION(CMUSHclientDoc, "GetTimerInfo", GetTimerInfo, VT_VARIANT, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetUniqueNumber", GetUniqueNumber, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Queue", Queue, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "DiscardQueue", DiscardQueue, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GenerateName", GenerateName, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ReadNamesFile", ReadNamesFile, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AddToMapper", AddToMapper, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetMappingCount", GetMappingCount, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetMappingItem", GetMappingItem, VT_VARIANT, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetMappingString", GetMappingString, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteLastMapItem", DeleteLastMapItem, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteAllMapItems", DeleteAllMapItems, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetSentBytes", GetSentBytes, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetReceivedBytes", GetReceivedBytes, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetConnectDuration", GetConnectDuration, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetScriptTime", GetScriptTime, VT_R8, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "WorldAddress", WorldAddress, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "WorldPort", WorldPort, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteCommandHistory", DeleteCommandHistory, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteOutput", DeleteOutput, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Tell", Tell, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "NoteColourRGB", NoteColourRGB, VT_EMPTY, VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "NoteColourName", NoteColourName, VT_EMPTY, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Version", Version, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Reset", Reset, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetOption", GetOption, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetOptionList", GetOptionList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "SetOption", SetOption, VT_I4, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "Debug", Debug, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Pause", Pause, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "Open", Open, VT_DISPATCH, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetLineInfo", GetLineInfo, VT_VARIANT, VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetLinesInBufferCount", GetLinesInBufferCount, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetStyleInfo", GetStyleInfo, VT_VARIANT, VTS_I4 VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetSelectionStartLine", GetSelectionStartLine, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetSelectionEndLine", GetSelectionEndLine, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetSelectionStartColumn", GetSelectionStartColumn, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetSelectionEndColumn", GetSelectionEndColumn, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetCommandList", GetCommandList, VT_VARIANT, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "PushCommand", PushCommand, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "SelectCommand", SelectCommand, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetCommand", GetCommand, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "AddTriggerEx", AddTriggerEx, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_I2 VTS_I2 VTS_BSTR VTS_BSTR VTS_I2 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetQueue", GetQueue, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTemporaryTriggers", DeleteTemporaryTriggers, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTemporaryAliases", DeleteTemporaryAliases, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTemporaryTimers", DeleteTemporaryTimers, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetInfo", GetInfo, VT_VARIANT, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetAlphaOptionList", GetAlphaOptionList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "SetAlphaOption", SetAlphaOption, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetAlphaOption", GetAlphaOption, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ColourNameToRGB", ColourNameToRGB, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "RGBColourToName", RGBColourToName, VT_BSTR, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "Base64Decode", Base64Decode, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Base64Encode", Base64Encode, VT_VARIANT, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetLoadedValue", GetLoadedValue, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetDefaultValue", GetDefaultValue, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetCurrentValue", GetCurrentValue, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ColourNote", ColourNote, VT_EMPTY, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ColourTell", ColourTell, VT_EMPTY, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "CreateGUID", CreateGUID, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Hash", Hash, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetUniqueID", GetUniqueID, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginVariable", GetPluginVariable, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginID", GetPluginID, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginList", GetPluginList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginInfo", GetPluginInfo, VT_VARIANT, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "LoadPlugin", LoadPlugin, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginVariableList", GetPluginVariableList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginTriggerList", GetPluginTriggerList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginAliasList", GetPluginAliasList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginTimerList", GetPluginTimerList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginTriggerInfo", GetPluginTriggerInfo, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginAliasInfo", GetPluginAliasInfo, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginTimerInfo", GetPluginTimerInfo, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "IsPluginInstalled", IsPluginInstalled, VT_BOOL, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SaveState", SaveState, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "CallPlugin", CallPlugin, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "PluginSupports", PluginSupports, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "EnablePlugin", EnablePlugin, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginName", GetPluginName, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "LogSend", LogSend, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AddMapperComment", AddMapperComment, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SendPush", SendPush, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "EnableGroup", EnableGroup, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "EnableTriggerGroup", EnableTriggerGroup, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "EnableAliasGroup", EnableAliasGroup, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "EnableTimerGroup", EnableTimerGroup, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "ShowInfoBar", ShowInfoBar, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "Info", Info, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "InfoFont", InfoFont, VT_EMPTY, VTS_BSTR VTS_I2 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "DeleteGroup", DeleteGroup, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTriggerGroup", DeleteTriggerGroup, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteAliasGroup", DeleteAliasGroup, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteTimerGroup", DeleteTimerGroup, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "InfoClear", InfoClear, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "InfoColour", InfoColour, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "InfoBackground", InfoBackground, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetTriggerOption", GetTriggerOption, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetTriggerOption", SetTriggerOption, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetAliasOption", GetAliasOption, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetTimerOption", GetTimerOption, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetAliasOption", SetAliasOption, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetTimerOption", SetTimerOption, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SaveNotepad", SaveNotepad, VT_I4, VTS_BSTR VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "CloseNotepad", CloseNotepad, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetEntity", GetEntity, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Execute", Execute, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatCall", ChatCall, VT_I4, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "AnsiNote", AnsiNote, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatNameChange", ChatNameChange, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatAcceptCalls", ChatAcceptCalls, VT_I4, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "ChatStopAcceptingCalls", ChatStopAcceptingCalls, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetChatList", GetChatList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetChatInfo", GetChatInfo, VT_VARIANT, VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "ChatEverybody", ChatEverybody, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "ChatPersonal", ChatPersonal, VT_I4, VTS_BSTR VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "ChatID", ChatID, VT_I4, VTS_I4 VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "ChatGroup", ChatGroup, VT_I4, VTS_BSTR VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "ChatPing", ChatPing, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ChatPeekConnections", ChatPeekConnections, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ChatRequestConnections", ChatRequestConnections, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ChatDisconnect", ChatDisconnect, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ChatMessage", ChatMessage, VT_I4, VTS_I4 VTS_I2 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ANSI", ANSI, VT_BSTR, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "StripANSI", StripANSI, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetChatOption", GetChatOption, VT_VARIANT, VTS_I4 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetChatOption", SetChatOption, VT_I4, VTS_I4 VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatNote", ChatNote, VT_EMPTY, VTS_I2 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatGetID", ChatGetID, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatDisconnectAll", ChatDisconnectAll, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ChatPasteText", ChatPasteText, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ChatSendFile", ChatSendFile, VT_I4, VTS_I4 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ChatStopFileTransfer", ChatStopFileTransfer, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ChatPasteEverybody", ChatPasteEverybody, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetWorldIdList", GetWorldIdList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetWorldById", GetWorldById, VT_DISPATCH, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetHostName", GetHostName, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetHostAddress", GetHostAddress, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetClipboard", GetClipboard, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ImportXML", ImportXML, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DoCommand", DoCommand, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetInternalCommandsList", GetInternalCommandsList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ChatCallzChat", ChatCallzChat, VT_I4, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetNotepadLength", GetNotepadLength, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetNotepadText", GetNotepadText, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SendImmediate", SendImmediate, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AdjustColour", AdjustColour, VT_I4, VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SendNoEcho", SendNoEcho, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ExportXML", ExportXML, VT_BSTR, VTS_I2 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Hyperlink", Hyperlink, VT_EMPTY, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "NoteStyle", NoteStyle, VT_EMPTY, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetNoteStyle", GetNoteStyle, VT_I2, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetFrame", GetFrame, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ArrayCreate", ArrayCreate, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayDelete", ArrayDelete, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayListAll", ArrayListAll, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ArrayImport", ArrayImport, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayGet", ArrayGet, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArraySet", ArraySet, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayExport", ArrayExport, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayListKeys", ArrayListKeys, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayClear", ArrayClear, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayDeleteKey", ArrayDeleteKey, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayExists", ArrayExists, VT_BOOL, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayKeyExists", ArrayKeyExists, VT_BOOL, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayExportKeys", ArrayExportKeys, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayCount", ArrayCount, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "ArraySize", ArraySize, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayGetFirstKey", ArrayGetFirstKey, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayGetLastKey", ArrayGetLastKey, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ArrayListValues", ArrayListValues, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ResetStatusTime", ResetStatusTime, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "EnableMapping", EnableMapping, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "ActivateClient", ActivateClient, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "RemoveBacktracks", RemoveBacktracks, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetTriggerWildcard", GetTriggerWildcard, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetRecentLines", GetRecentLines, VT_BSTR, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetAliasWildcard", GetAliasWildcard, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ReloadPlugin", ReloadPlugin, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "TranslateGerman", TranslateGerman, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetWorldID", GetWorldID, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Accelerator", Accelerator, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AcceleratorList", AcceleratorList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "MapColour", MapColour, VT_EMPTY, VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "SpellCheck", SpellCheck, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetMapColour", GetMapColour, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "MapColourList", MapColourList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "MakeRegularExpression", MakeRegularExpression, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SpellCheckCommand", SpellCheckCommand, VT_I4, VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "MoveMainWindow", MoveMainWindow, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "MoveWorldWindow", MoveWorldWindow, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "MoveNotepadWindow", MoveNotepadWindow, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetSysColor", GetSysColor, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetSystemMetrics", GetSystemMetrics, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetMainWindowPosition", GetMainWindowPosition, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetWorldWindowPosition", GetWorldWindowPosition, VT_BSTR, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetNotepadWindowPosition", GetNotepadWindowPosition, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "UdpSend", UdpSend, VT_I4, VTS_BSTR VTS_I2 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "UdpListen", UdpListen, VT_I4, VTS_BSTR VTS_I2 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "NotepadColour", NotepadColour, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "NotepadFont", NotepadFont, VT_I4, VTS_BSTR VTS_BSTR VTS_I2 VTS_I2 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "MtSrand", MtSrand, VT_EMPTY, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "MtRand", MtRand, VT_R8, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "SetChanged", SetChanged, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "UdpPortList", UdpPortList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "AddTimer", AddTimer, VT_I4, VTS_BSTR VTS_I2 VTS_I2 VTS_R8 VTS_BSTR VTS_I4 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DoAfter", DoAfter, VT_I4, VTS_R8 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DoAfterNote", DoAfterNote, VT_I4, VTS_R8 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DoAfterSpeedWalk", DoAfterSpeedWalk, VT_I4, VTS_R8 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DoAfterSpecial", DoAfterSpecial, VT_I4, VTS_R8 VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "NoteHr", NoteHr, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "MoveWorldWindowX", MoveWorldWindowX, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetWorldWindowPositionX", GetWorldWindowPositionX, VT_BSTR, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SetEntity", SetEntity, VT_EMPTY, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetXMLEntity", GetXMLEntity, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetUdpPort", GetUdpPort, VT_I4, VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "SetClipboard", SetClipboard, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "BroadcastPlugin", BroadcastPlugin, VT_I4, VTS_I4 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "PickColour", PickColour, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "TraceOut", TraceOut, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ErrorDesc", ErrorDesc, VT_BSTR, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "PasteCommand", PasteCommand, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Help", Help, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Simulate", Simulate, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "ResetIP", ResetIP, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "AddSpellCheckWord", AddSpellCheckWord, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "OpenBrowser", OpenBrowser, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DeleteLines", DeleteLines, VT_EMPTY, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "NotepadSaveMethod", NotepadSaveMethod, VT_BOOL, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "ChangeDir", ChangeDir, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SendPkt", SendPkt, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Metaphone", Metaphone, VT_BSTR, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "EditDistance", EditDistance, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "FlushLog", FlushLog, VT_I4, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "Transparency", Transparency, VT_BOOL, VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SpellCheckDlg", SpellCheckDlg, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetWorldWindowStatus", SetWorldWindowStatus, VT_EMPTY, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetCustomColourName", GetCustomColourName, VT_BSTR, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SetCustomColourName", SetCustomColourName, VT_I4, VTS_I2 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetNotepadList", GetNotepadList, VT_VARIANT, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "TranslateDebug", TranslateDebug, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SendSpecial", SendSpecial, VT_I4, VTS_BSTR VTS_BOOL VTS_BOOL VTS_BOOL VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "GetGlobalOption", GetGlobalOption, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetGlobalOptionList", GetGlobalOptionList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginTriggerOption", GetPluginTriggerOption, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginAliasOption", GetPluginAliasOption, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "GetPluginTimerOption", GetPluginTimerOption, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "AcceleratorTo", AcceleratorTo, VT_I4, VTS_BSTR VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "StopSound", StopSound, VT_I4, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "GetSoundStatus", GetSoundStatus, VT_I4, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "PlaySound", PlaySound, VT_I4, VTS_I2 VTS_BSTR VTS_BOOL VTS_R8 VTS_R8)
DISP_FUNCTION(CMUSHclientDoc, "SetCommandWindowHeight", SetCommandWindowHeight, VT_I4, VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SetToolBarPosition", SetToolBarPosition, VT_I4, VTS_I2 VTS_BOOL VTS_I2 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ShiftTabCompleteItem", ShiftTabCompleteItem, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "NotepadReadOnly", NotepadReadOnly, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "AddFont", AddFont, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetBackgroundImage", SetBackgroundImage, VT_I4, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SetForegroundImage", SetForegroundImage, VT_I4, VTS_BSTR VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "SetBackgroundColour", SetBackgroundColour, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowRectOp", WindowRectOp, VT_I4, VTS_BSTR VTS_I2 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowShow", WindowShow, VT_I4, VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "WindowTextWidth", WindowTextWidth, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "WindowFontInfo", WindowFontInfo, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowLine", WindowLine, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowArc", WindowArc, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowList", WindowList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "WindowFontList", WindowFontList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowInfo", WindowInfo, VT_VARIANT, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowLoadImage", WindowLoadImage, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowImageList", WindowImageList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowText", WindowText, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "WindowDrawImage", WindowDrawImage, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowImageInfo", WindowImageInfo, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "GetDeviceCaps", GetDeviceCaps, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowBezier", WindowBezier, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowCreate", WindowCreate, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowPosition", WindowPosition, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I2 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowDeleteHotspot", WindowDeleteHotspot, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowHotspotList", WindowHotspotList, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowDeleteAllHotspots", WindowDeleteAllHotspots, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowHotspotInfo", WindowHotspotInfo, VT_VARIANT, VTS_BSTR VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowPolygon", WindowPolygon, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_BOOL VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "WindowAddHotspot", WindowAddHotspot, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowCircleOp", WindowCircleOp, VT_I4, VTS_BSTR VTS_I2 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowCreateImage", WindowCreateImage, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowImageOp", WindowImageOp, VT_I4, VTS_BSTR VTS_I2 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_BSTR VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowFont", WindowFont, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_R8 VTS_BOOL VTS_BOOL VTS_BOOL VTS_BOOL VTS_I2 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "WindowBlendImage", WindowBlendImage, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2 VTS_R8 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowImageFromWindow", WindowImageFromWindow, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Repaint", Repaint, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "TextRectangle", TextRectangle, VT_I4, VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowGradient", WindowGradient, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2)
DISP_FUNCTION(CMUSHclientDoc, "WindowFilter", WindowFilter, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2 VTS_R8)
DISP_FUNCTION(CMUSHclientDoc, "WindowSetPixel", WindowSetPixel, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowGetPixel", WindowGetPixel, VT_I4, VTS_BSTR VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowWrite", WindowWrite, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "FilterPixel", FilterPixel, VT_I4, VTS_I4 VTS_I2 VTS_R8)
DISP_FUNCTION(CMUSHclientDoc, "BlendPixel", BlendPixel, VT_I4, VTS_I4 VTS_I4 VTS_I2 VTS_R8)
DISP_FUNCTION(CMUSHclientDoc, "WindowMergeImageAlpha", WindowMergeImageAlpha, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I2 VTS_R8 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowDelete", WindowDelete, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowMenu", WindowMenu, VT_BSTR, VTS_BSTR VTS_I4 VTS_I4 VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetCommandSelection", SetCommandSelection, VT_I4, VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowDragHandler", WindowDragHandler, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "SetCursor", SetCursor, VT_I4, VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseClose", DatabaseClose, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabasePrepare", DatabasePrepare, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseFinalize", DatabaseFinalize, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumns", DatabaseColumns, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseStep", DatabaseStep, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseError", DatabaseError, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumnName", DatabaseColumnName, VT_BSTR, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumnType", DatabaseColumnType, VT_I4, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumnText", DatabaseColumnText, VT_BSTR, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumnValue", DatabaseColumnValue, VT_VARIANT, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseOpen", DatabaseOpen, VT_I4, VTS_BSTR VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseTotalChanges", DatabaseTotalChanges, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseChanges", DatabaseChanges, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseLastInsertRowid", DatabaseLastInsertRowid, VT_BSTR, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseList", DatabaseList, VT_VARIANT, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseInfo", DatabaseInfo, VT_VARIANT, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseExec", DatabaseExec, VT_I4, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumnNames", DatabaseColumnNames, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseColumnValues", DatabaseColumnValues, VT_VARIANT, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseReset", DatabaseReset, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "FlashIcon", FlashIcon, VT_EMPTY, VTS_NONE)
DISP_FUNCTION(CMUSHclientDoc, "WindowHotspotTooltip", WindowHotspotTooltip, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowDrawImageAlpha", WindowDrawImageAlpha, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_R8 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowGetImageAlpha", WindowGetImageAlpha, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowScrollwheelHandler", WindowScrollwheelHandler, VT_I4, VTS_BSTR VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowResize", WindowResize, VT_I4, VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowMoveHotspot", WindowMoveHotspot, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "WindowTransformImage", WindowTransformImage, VT_I4, VTS_BSTR VTS_BSTR VTS_R4 VTS_R4 VTS_I2 VTS_R4 VTS_R4 VTS_R4 VTS_R4)
DISP_FUNCTION(CMUSHclientDoc, "SetScroll", SetScroll, VT_I4, VTS_I4 VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "Menu", Menu, VT_BSTR, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "DatabaseGetField", DatabaseGetField, VT_VARIANT, VTS_BSTR VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "WindowSetZOrder", WindowSetZOrder, VT_I4, VTS_BSTR VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "UnloadPlugin", UnloadPlugin, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "Bookmark", Bookmark, VT_EMPTY, VTS_I4 VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "SetTitle", SetTitle, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "SetMainTitle", SetMainTitle, VT_EMPTY, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "StopEvaluatingTriggers", StopEvaluatingTriggers, VT_EMPTY, VTS_BOOL)
DISP_FUNCTION(CMUSHclientDoc, "SetUnseenLines", SetUnseenLines, VT_EMPTY, VTS_I4)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "NormalColour", GetNormalColour, SetNormalColour, VT_I4, VTS_I2)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "BoldColour", GetBoldColour, SetBoldColour, VT_I4, VTS_I2)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "CustomColourText", GetCustomColourText, SetCustomColourText, VT_I4, VTS_I2)
DISP_PROPERTY_PARAM(CMUSHclientDoc, "CustomColourBackground", GetCustomColourBackground, SetCustomColourBackground, VT_I4, VTS_I2)
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
/*
These are the prototypes for the methods when we had panes in ...
DISP_FUNCTION(CMUSHclientDoc, "ClosePane", ClosePane, VT_I4, VTS_BSTR)
DISP_FUNCTION(CMUSHclientDoc, "CreatePane", CreatePane, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_BSTR VTS_I2 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "PaneText", PaneText, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "PaneLine", PaneLine, VT_I4, VTS_BSTR VTS_BSTR VTS_I4 VTS_I4 VTS_I4)
DISP_FUNCTION(CMUSHclientDoc, "ClearPane", ClearPane, VT_I4, VTS_BSTR)
*/
// Note: we add support for IID_IMUSHclient to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {11DFC5E8-AD6F-11D0-8EAE-00A0247B3BFD}
static const IID IID_IMUSHclient =
{ 0x11dfc5e8, 0xad6f, 0x11d0, { 0x8e, 0xae, 0x0, 0xa0, 0x24, 0x7b, 0x3b, 0xfd } };
BEGIN_INTERFACE_MAP(CMUSHclientDoc, CDocument)
INTERFACE_PART(CMUSHclientDoc, IID_IMUSHclient, Dispatch)
END_INTERFACE_MAP()
// zlib helpers for memory allocation
/*
static void * zlib_alloc (void * opaque, unsigned int items, unsigned int size)
{
size_t total_size = items * size;
void * p = malloc (total_size);
if (p == NULL)
{
TRACE1 ("Could not allocate zlib memory: %i bytes\n", total_size);
::TMessageBox (TFormat ("Could not allocate zlib memory: %i bytes",
total_size), MB_ICONEXCLAMATION);
}
else
{
TRACE2 ("Allocated zlib memory: %p, %i bytes\n", p, total_size);
}
return p;
} // end of zlib_alloc
static void zlib_free (void * opaque, void * address)
{
free (address);
} // end of zlib_free
*/
void CMUSHclientDoc::OutputOutstandingLines (void)
{
// minimal work ...
if (m_OutstandingLines.empty ())
return;
// save old colours
bool bOldNotesInRGB = m_bNotesInRGB;
COLORREF iOldNoteColourFore = m_iNoteColourFore;
COLORREF iOldNoteColourBack = m_iNoteColourBack;
unsigned short iOldNoteStyle = m_iNoteStyle;
m_bNotesInRGB = true;
// output saved lines
list<CPaneStyle>::iterator it;
for (it = m_OutstandingLines.begin (); it != m_OutstandingLines.end (); it++)
{
m_iNoteColourFore = it->m_cText;
m_iNoteColourBack = it->m_cBack;
m_iNoteStyle = it->m_iStyle;
Tell (it->m_sText.c_str ());
}
m_OutstandingLines.clear ();
// put the colours back
if (bOldNotesInRGB)
{
m_iNoteColourFore = iOldNoteColourFore;
m_iNoteColourBack = iOldNoteColourBack;
}
else
m_bNotesInRGB = false;
m_iNoteStyle = iOldNoteStyle;
} // end of CMUSHclientDoc::OutputOutstandingLines
void CMUSHclientDoc::SetUpOutputWindow (void)
{
// Accept incoming chat calls
if (m_bAcceptIncomingChatConnections)
ChatAcceptCalls (0);
// document details will be loaded now, so set screen font
ChangeFont (m_font_height,
m_font_name,
m_font_weight,
m_font_charset,
m_bShowBold,
m_bShowItalic,
m_bShowUnderline,
m_iLineSpacing);
ChangeInputFont (m_input_font_height,
m_input_font_name,
m_input_font_weight,
m_input_font_charset,
m_input_font_italic);
// we defer allocating positions array to now, because m_maxlines is read from the
// document file.
if (!m_pLinePositions)
{
m_pLinePositions = new POSITION [(m_maxlines / JUMP_SIZE) + 1];
// clear all elements
for (int i = 0; i <= m_maxlines / JUMP_SIZE; i++)
m_pLinePositions [i] = NULL;
m_pLinePositions [0] = m_LineList.GetHeadPosition ();
} // end of not having a positions array yet
// we defer allocating the first line to now, because m_nWrapColumn is read from the
// document file.
// put first line in line list
if (!m_pCurrentLine)
{
m_total_lines = 0;
m_pCurrentLine = new CLine (++m_total_lines, m_nWrapColumn, 0, WHITE, BLACK, m_bUTF_8);
m_LineList.AddTail (m_pCurrentLine);
}
Note ("");
Note (TFormat ("Welcome to MUSHclient version %s!", MUSHCLIENT_VERSION));
Note (Translate ("Written by Nick Gammon."));
Note ("");
// show compilation date
Note (TFormat ("Compiled: %s at %s.", __DATE__, __TIME__));
// show included library versions
Note (TFormat ("Using: %s, PCRE %s, PNG %s, SQLite3 %s, Zlib %s",
LUA_RELEASE,
XSTRING(PCRE_MAJOR.PCRE_MINOR),
PNG_LIBPNG_VER_STRING,
SQLITE_VERSION,
ZLIB_VERSION));
Note ("");
Note (Translate ("For information and assistance about MUSHclient visit our forum at:"));
Tell (" ");
Hyperlink (MUSHCLIENT_FORUM_URL, FORUM_URL, Translate ("MUSHclient forum"),
"deepskyblue", "black", TRUE);
Note ("");
Tell (Translate ("Can you trust your plugins? See: "));
Hyperlink (SECURITY_URL, SECURITY_URL, Translate ("How to trust plugins"),
"deepskyblue", "black", TRUE);
Note ("");
// output stuff that appeared before we set up the output buffer
OutputOutstandingLines ();
// set output window(s) to "pause" if wanted
for(POSITION pos=GetFirstViewPosition();pos!=NULL;)
{
CView* pView = GetNextView(pos);
if (pView->IsKindOf(RUNTIME_CLASS(CMUSHView)))
{
CMUSHView* pmyView = (CMUSHView*)pView;
pmyView->m_freeze = m_bStartPaused;
}
} // end of looping through views
// ------ load global plugins (unless already loaded from world file)
CString strPath;
try
{
vector<string> v;
PluginListIterator pit;
StringToVector ((LPCTSTR) App.m_strPluginList, v, "*");
for (vector<string>::const_iterator i = v.begin (); i != v.end (); i++)
{
strPath = i->c_str ();
string sGlobalPluginPath (Make_Absolute_Path (strPath));
bool bAlreadyLoaded = false;
// see if we already have this one
for (pit = m_PluginList.begin ();
pit != m_PluginList.end ();
++pit)
{
CPlugin * p = *pit;
// convert filename to absolute path for a better comparison
string sThisPluginPath (Make_Absolute_Path (p->m_strSource));
if (sGlobalPluginPath == sThisPluginPath)
{
bAlreadyLoaded = true;
p->m_bGlobal = true;
break;
} // end of same plugin
} // end of searching for it
if (!bAlreadyLoaded)
{
InternalLoadPlugin (strPath);
// mark it as loaded globally
for (pit = m_PluginList.begin ();
pit != m_PluginList.end ();
++pit)
{
CPlugin * p = *pit;
// convert filename to absolute path for a better comparison
string sThisPluginPath (Make_Absolute_Path (p->m_strSource));
if (sGlobalPluginPath == sThisPluginPath)
{
p->m_bGlobal = true;
break;
} // end of same plugin
} // end of searching for it
}
} // end of loading each plugin
} // end of try block
catch (CFileException * e)
{
UMessageBox (TFormat ("Unable to open or read %s",
(LPCTSTR) strPath), MB_ICONEXCLAMATION);
e->Delete ();
} // end of catching a file exception
catch (CArchiveException* e)
{
UMessageBox (TFormat ("There was a problem loading the plugin %s. "
"See the output window for more details",
(LPCTSTR) strPath), MB_ICONEXCLAMATION);
e->Delete ();
}
SetModifiedFlag (FALSE); // loading plugins doesn't count
} // end of CMUSHclientDoc::SetUpOutputWindow
bool CMUSHclientDoc::SeeIfHandlerCanExecute (const CString & strName)
{
if (!strName.IsEmpty () && strName [0] == '!')
{
Execute (strName.Mid (1));
return false;
}
return true; // go ahead and call normal script
} // end of SeeIfHandlerCanExecute
BOOL CMUSHclientDoc::OpenSession (void)
{
// initialise scripting engine if necessary
if (m_bEnableScripts && // provided wanted
!m_ScriptEngine) // and not already going
CreateScriptEngine (); // create scripting engine
// execute "open" script
if (m_ScriptEngine)
{
if (SeeIfHandlerCanExecute (m_strWorldOpen))
{
DISPPARAMS params = { NULL, NULL, 0, 0 };
long nInvocationCount = 0;
ExecuteScript (m_dispidWorldOpen,
m_strWorldOpen,
eWorldAction,
"world open",
"opening world",
params,
nInvocationCount);
}
} // end of executing open script
if (App.m_bAutoConnectWorlds)
if (ConnectSocket())
return TRUE;
return FALSE;
} // end of OpenSession
/////////////////////////////////////////////////////////////////////////////
// CMUSHclientDoc diagnostics
#ifdef _DEBUG
void CMUSHclientDoc::AssertValid() const
{
CDocument::AssertValid();
// a few little checks to make sure our document is OK
// but what will they be?
}
void CMUSHclientDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMUSHclientDoc commands
BOOL CMUSHclientDoc::ConnectSocket(void)
{
CString str;
// no IP? don't connect
if (m_server == "0.0.0.0")
return FALSE;
// a few checks, in case they slip in blank names/site/port via configuration
if (m_mush_name.IsEmpty ())
{
TMessageBox ("Cannot connect. World name not specified");
return FALSE;
}
if (m_server.IsEmpty ())
{
UMessageBox (TFormat ("Cannot connect to \"%s\", TCP/IP address not specified",
(const char *) m_mush_name));
return FALSE;
}