summaryrefslogtreecommitdiff
path: root/src/common/HPMi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/HPMi.h')
-rw-r--r--src/common/HPMi.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 7637dc832..2cd1075c4 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -105,6 +105,30 @@ enum HPluginDataTypes {
#define getFromNPCD(ptr,index) (HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))
#define removeFromNPCD(ptr,index) (HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))
+/* HPMi->addCommand */
+#define addAtcommand(cname,funcname) \
+ if ( HPMi->addCommand != NULL ) { \
+ HPMi->addCommand(cname,atcommand_ ## funcname); \
+ } else { \
+ ShowWarning("HPM (%s):addAtcommand(\"%s\",%s) failed, addCommand sub is NULL!\n",pinfo.name,cname,# funcname);\
+ }
+/* HPMi->addScript */
+#define addScriptCommand(cname,scinfo,funcname) \
+ if ( HPMi->addScript != NULL ) { \
+ HPMi->addScript(cname,scinfo,buildin_ ## funcname); \
+ } else { \
+ ShowWarning("HPM (%s):addScriptCommand(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\
+ }
+/* HPMi->addCPCommand */
+#define addCPCommand(cname,funcname) \
+ if ( HPMi->addCPCommand != NULL ) { \
+ HPMi->addCPCommand(cname,console_parse_ ## funcname); \
+ } else { \
+ ShowWarning("HPM (%s):addCPCommand(\"%s\",%s) failed, addCPCommand sub is NULL!\n",pinfo.name,cname,# funcname);\
+ }
+/* HPMi->addPacket */
+#define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid)
+
/* Hercules Plugin Mananger Include Interface */
HPExport struct HPMi_interface {
/* */