Author: beware (by Spike)
[ircu2.10.12-pk.git] / include / channel.h
index ff39e43cebc820e56097e9da27f96434b1d82f44..aafcb3c560aac82815cefd2086ba769a8d8d78fb 100644 (file)
@@ -100,6 +100,9 @@ struct Client;
  */
 #define MODE_WPARAS     (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS)
 
+#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "Abiklmnopstuvr" : "biklmnopstvr"
+#define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "Abklouv" : "bklov"
+
 #define HoldChannel(x)          (!(x))
 /* name invisible */
 #define SecretChannel(x)        ((x) && ((x)->mode.mode & MODE_SECRET))
@@ -113,9 +116,8 @@ struct Client;
 #define is_listed(x)            ((x)->mode.mode & MODE_LISTED)
 
 #define IsLocalChannel(name)    (*(name) == '&')
-#define IsModelessChannel(name) (*(name) == '+')
 #define IsChannelName(name)     (*(name) == '#' || \
-                                IsModelessChannel(name) || IsLocalChannel(name))
+                                IsLocalChannel(name))
 
 typedef enum ChannelGetType {
   CGT_NO_CREATE,
@@ -349,6 +351,12 @@ extern void remove_user_from_all_channels(struct Client* cptr);
 extern int is_chan_op(struct Client *cptr, struct Channel *chptr);
 extern int is_zombie(struct Client *cptr, struct Channel *chptr);
 extern int has_voice(struct Client *cptr, struct Channel *chptr);
+/*
+   NOTE: pointer is compared, and not dereferenced, called by
+   add_target with a void*, since targets could be anything,
+   this function can't make any assumptions that it has a channel
+*/
+extern int IsInvited(struct Client* cptr, const void* chptr);
 extern void send_channel_modes(struct Client *cptr, struct Channel *chptr);
 extern char *pretty_mask(char *mask);
 extern void del_invite(struct Client *cptr, struct Channel *chptr);