added basic halfop support
[NeonServV5.git] / src / ChanUser.h
index 076b7f79d76177472513ee58dd15439d382d75ae..f3ca4848d78da6efdcf4870a0db107d9f5413663 100644 (file)
@@ -1,3 +1,19 @@
+/* ChanUser.h - NeonServ v5.2
+ * Copyright (C) 2011  Philipp Kreil (pk910)
+ * 
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License 
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. 
+ */
 #ifndef _ChanUser_h
 #define _ChanUser_h
 #include "main.h"
 #define CHANUSERFLAG_OPPED  0x01
 #define CHANUSERFLAG_VOICED 0x02
 #define CHANUSERFLAG_INVISIBLE 0x04
+#define CHANUSERFLAG_HALFOPPED 0x08
 
-#define CHANUSERFLAG_OPPED_OR_VOICED (CHANUSERFLAG_OPPED | CHANUSERFLAG_VOICED)
+#define CHANUSERFLAG_OPPED_OR_VOICED (CHANUSERFLAG_OPPED | CHANUSERFLAG_HALFOPPED | CHANUSERFLAG_VOICED)
 
 struct ChanNode;
 struct UserNode;
+struct NeonSpamNode;
 
 struct ChanUser {
     unsigned char flags;
@@ -19,6 +37,8 @@ struct ChanUser {
     int chageEvents;
     time_t changeTime;
     
+    struct NeonSpamNode *spamnode;
+    
     struct ChanUser *next_user;
     struct ChanUser *next_chan;
 };
@@ -31,5 +51,6 @@ struct ChanUser* getChannelUsers(struct ChanNode *chan, struct ChanUser *last);
 struct ChanUser* getUserChannels(struct UserNode *user, struct ChanUser *last);
 void delChanUser(struct ChanUser *chanuser, int freeChanUser);
 void removeChanUserFromLists(struct ChanUser *chanuser, int remove_from_userlist, int remove_from_channellist, int freeChanUser);
+void freeChanUser(struct ChanUser *chanuser);
 
 #endif
\ No newline at end of file