]> jfr.im git - irc/atheme/atheme.git/commitdiff
Add UF_SERVICE user flag and some support in proto modules
authorAlex Iadicicco <redacted>
Thu, 7 Aug 2014 05:20:06 +0000 (22:20 -0700)
committerAlex Iadicicco <redacted>
Thu, 7 Aug 2014 05:20:06 +0000 (22:20 -0700)
include/users.h
libathemecore/function.c
modules/protocol/charybdis.c
modules/protocol/elemental-ircd.c
modules/protocol/ircd-seven.c
modules/protocol/ratbox.c
modules/protocol/shadowircd.c

index ea27d9c6db16e16a620182f8657e6206f3c31522..22e7b36969d65d5c7392906868a56e5b963d6e30 100644 (file)
@@ -54,6 +54,7 @@ struct user_
 #define UF_ENFORCER    0x00001000 /* this is an enforcer client */
 #define UF_WASENFORCED 0x00002000 /* this user was FNCed once already */
 #define UF_DEAF        0x00004000 /* user does not receive channel msgs */
+#define UF_SERVICE     0x00008000 /* user is a service (e.g. +S on charybdis) */
 
 #define CLIENT_NAME(user)      ((user)->uid != NULL ? (user)->uid : (user)->nick)
 
@@ -72,6 +73,7 @@ E bool is_ircop(user_t *user);
 E bool is_admin(user_t *user);
 E bool is_internal_client(user_t *user);
 E bool is_autokline_exempt(user_t *user);
+E bool is_service(user_t *user);
 
 /* users.c */
 E mowgli_patricia_t *userlist;
index ff04707d1713b2805ef307beb40acc3173f593d1..5a9d8b601b5351719166fa4488b7c70830e9bb03 100644 (file)
@@ -811,6 +811,14 @@ bool is_autokline_exempt(user_t *user)
        return false;
 }
 
+bool is_service(user_t *user)
+{
+       if (UF_SERVICE & user->flags)
+               return true;
+
+       return false;
+}
+
 char *sbytes(float x)
 {
        if (x > 1073741824.0)
index bb406011da5d65bd0b8a5b0f61f6d02e36d158d7..c882879874ffc371aa66d067747417839f607a41 100644 (file)
@@ -95,6 +95,7 @@ struct cmode_ charybdis_user_mode_list[] = {
   { 'i', UF_INVIS    },
   { 'o', UF_IRCOP    },
   { 'D', UF_DEAF     },
+  { 'S', UF_SERVICE  },
   { '\0', 0 }
 };
 
index 43c6b63da10d35757c045b426068e4d3cc9cff56..d09a9a8953db60371f7ac0d7796cceb2edd02fa6 100644 (file)
@@ -97,6 +97,7 @@ struct cmode_ elemental_user_mode_list[] = {
   { 'i', UF_INVIS    },
   { 'o', UF_IRCOP    },
   { 'D', UF_DEAF     },
+  { 'S', UF_SERVICE  },
   { '\0', 0 }
 };
 
index ab187a33522eac3ce2def4ad300bd5315b130ee1..7d5aae1cbd0f7c48ba59afd3da5a44fc7323c5dd 100644 (file)
@@ -76,6 +76,7 @@ struct cmode_ seven_user_mode_list[] = {
   { 'i', UF_INVIS    },
   { 'o', UF_IRCOP    },
   { 'D', UF_DEAF     },
+  { 'S', UF_SERVICE  },
   { '\0', 0 }
 };
 
index 449b4b8f2746f4f2b33ab8035ffffce8c21f2a9d..043c30f12474ed8644d01fbf90391cb7eb1065a4 100644 (file)
@@ -73,6 +73,7 @@ struct cmode_ ratbox_user_mode_list[] = {
   { 'i', UF_INVIS    },
   { 'o', UF_IRCOP    },
   { 'D', UF_DEAF     },
+  { 'S', UF_SERVICE  },
   { '\0', 0 }
 };
 
index 2422ad972be59ba136e5e1d980c1b74eb35384c5..ce5a50d40cb876e827225e5358610a35d44797e8 100644 (file)
@@ -94,6 +94,7 @@ struct cmode_ shadowircd_user_mode_list[] = {
   { 'i', UF_INVIS    },
   { 'o', UF_IRCOP    },
   { 'D', UF_DEAF     },
+  { 'S', UF_SERVICE  },
   { '\0', 0 }
 };