]> jfr.im git - irc/quakenet/snircd.git/blobdiff - include/gline.h
forward port of asuka-nickgline.patch to .12
[irc/quakenet/snircd.git] / include / gline.h
index 245cd9c460196da86ee96504426a05ed4c8a6de6..0129b7a276bac188f88fc99fd63bc567de8d278b 100644 (file)
 struct Client;
 struct StatDesc;
 
-#define GLINE_MAX_EXPIRE 604800        /**< max expire: 7 days */
+#define GLINE_MAX_EXPIRE 31536000      /**< max expire: 1 year */
 
 /** Description of a G-line. */
 struct Gline {
   struct Gline *gl_next;      /**< Next G-line in linked list. */
   struct Gline**gl_prev_p;    /**< Previous pointer to this G-line. */
+  char        *gl_nick;      /**< Nickname mask. */
   char        *gl_user;      /**< Username mask (or channel/realname mask). */
   char        *gl_host;      /**< Host prtion of mask. */
   char        *gl_reason;    /**< Reason for G-line. */
@@ -84,6 +85,8 @@ struct Gline {
 /** Test whether \a g is local to this server. */
 #define GlineIsLocal(g)                ((g)->gl_flags & GLINE_LOCAL)
 
+/** Return nick mask of a G-line. */
+#define GlineNick(g)           ((g)->gl_nick)
 /** Return user mask of a G-line. */
 #define GlineUser(g)           ((g)->gl_user)
 /** Return host mask of a G-line. */
@@ -113,5 +116,6 @@ extern int gline_list(struct Client *sptr, char *userhost);
 extern void gline_stats(struct Client *sptr, const struct StatDesc *sd,
                         char *param);
 extern int gline_memory_count(size_t *gl_size);
+extern struct Gline *IsNickGlined(struct Client *cptr, char *nick);
 
 #endif /* INCLUDED_gline_h */