+/** Check if this user is a legitimate halfop
+ *
+ * @param cptr Client to check
+ * @param chptr Channel to check
+ *
+ * @returns True if the user is a halfop (And not a zombie), False otherwise.
+ * @see \ref zombie
+ */
+int is_halfop(struct Client *cptr, struct Channel *chptr)
+{
+ struct Membership* member;
+ assert(chptr);
+ if ((member = find_member_link(chptr, cptr)))
+ return (!IsZombie(member) && IsHalfOp(member));
+
+ return 0;
+}
+