summaryrefslogtreecommitdiff
path: root/src/core/chatnets.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/chatnets.h')
-rw-r--r--src/core/chatnets.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/chatnets.h b/src/core/chatnets.h
index 724421cf..7170c478 100644
--- a/src/core/chatnets.h
+++ b/src/core/chatnets.h
@@ -3,13 +3,12 @@
#include "modules.h"
-#define IS_CHATNET(chatnet) \
- ((chatnet) != NULL && \
- module_find_id("CHATNET", (chatnet)->type) != -1)
-
/* Returns CHATNET_REC if it's chatnet, NULL if it isn't. */
#define CHATNET(chatnet) \
- (IS_CHATNET(chatnet) ? (CHATNET_REC *) (chatnet) : NULL)
+ MODULE_CHECK_CAST(chatnet, CHATNET_REC, type, "CHATNET")
+
+#define IS_CHATNET(chatnet) \
+ (CHATNET(chatnet) ? TRUE : FALSE)
typedef struct {
#include "chatnet-rec.h"