summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-channels.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-30 22:29:55 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-30 22:29:55 +0000
commitb4bdec4436190d7ccb6252be388b5ee70c5c36f5 (patch)
tree5b80eb0eab42f347575c05dbff3361f9955cd6ee /src/irc/core/irc-channels.h
parentcf7eb945ea769b51622a1c1cbbbc7e7a6a494df9 (diff)
downloadirssi-b4bdec4436190d7ccb6252be388b5ee70c5c36f5.zip
Object type checking fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@638 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core/irc-channels.h')
-rw-r--r--src/irc/core/irc-channels.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/irc/core/irc-channels.h b/src/irc/core/irc-channels.h
index 9a331082..b4040bf5 100644
--- a/src/irc/core/irc-channels.h
+++ b/src/irc/core/irc-channels.h
@@ -4,14 +4,12 @@
#include "channels.h"
#include "irc-servers.h"
-#define IS_IRC_CHANNEL(channel) \
- ((channel) != NULL && \
- module_find_id("IRC CHANNEL", \
- ((IRC_CHANNEL_REC *) (channel))->chat_type) != -1)
-
/* Returns IRC_CHANNEL_REC if it's IRC channel, NULL if it isn't. */
#define IRC_CHANNEL(channel) \
- (IS_IRC_CHANNEL(channel) ? (IRC_CHANNEL_REC *) (channel) : NULL)
+ MODULE_CHECK_CAST(channel, IRC_CHANNEL_REC, chat_type, "IRC CHANNEL")
+
+#define IS_IRC_CHANNEL(channel) \
+ (IRC_CHANNEL(channel) ? TRUE : FALSE)
#define STRUCT_SERVER_REC IRC_SERVER_REC
typedef struct {