Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git] / src / modcmd.h
index 8ced9459e580ef68f4779590f75f0d36a568a0c0..38e3be18124c87f665568c0c971da618831dcc1f 100644 (file)
@@ -1,5 +1,5 @@
 /* modcmd.h - NeonServ v5.3
- * Copyright (C) 2011  Philipp Kreil (pk910)
+ * Copyright (C) 2011-2012  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
@@ -72,6 +72,8 @@ struct cmd_binding {
     struct cmd_binding *next;
 };
 
+#define BIND_FLAGS(BIND) (BIND->flags | BIND->func->flags)
+
 struct trigger_cache {
     int botid;
     int clientid;
@@ -91,6 +93,8 @@ struct ClientSocket* get_botwise_prefered_bot(int botid, int clientid);
 int register_command(int botid, char *name, cmd_bind_t *func, int paramcount, char *channel_access, int global_access, unsigned int flags);
 int set_trigger_callback(int botid, trigger_callback_t *func);
 
+int flush_trigger_cache(int botid, int clientid);
+
 #define changeChannelTrigger(BOTID,CHAN,NEW) changeBotwiseChannelTrigger(BOTID, 0, CHAN, NEW)
 int changeBotwiseChannelTrigger(int botid, int clientid, struct ChanNode *chan, char *new_trigger);
 
@@ -114,6 +118,9 @@ void bind_botwise_set_global_access(int botid, int clientid, char *cmd, int gacc
 #define bind_set_channel_access(BOTID,CMD,CACCESS) bind_botwise_set_channel_access(BOTID, 0, CMD, CACCESS)
 void bind_botwise_set_channel_access(int botid, int clientid, char *cmd, char *chanaccess);
 
+#define bind_set_bind_flags(BOTID,CMD,FLAGS) bind_botwise_set_bind_flags(BOTID, 0, CMD, FLAGS)
+void bind_botwise_set_bind_flags(int botid, int clientid, char *cmd, unsigned int flags);
+
 #define find_cmd_binding(BOTID,CMD) find_botwise_cmd_binding(BOTID, 0, CMD)
 struct cmd_binding *find_botwise_cmd_binding(int botid, int clientid, char *cmd);