summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h
index 5e985b8bb..f52c1653b 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -101,6 +101,12 @@ typedef std::deque<userrec*> chanuserlist;
#define FD_MAGIC_NUMBER -42
+// useful macros
+
+#define IS_LOCAL(x) (x->fd > -1)
+#define IS_REMOTE(x) (x->fd < 0)
+#define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER)
+
// flags for use with WriteMode
#define WM_AND 1