6 #include "../nick/nick.h"
7 #include "../lib/flags.h"
8 #include "../irc/irc.h"
10 #define LU_PRIVMSG 0x0001 /* (sender, message) */
11 #define LU_PRIVNOTICE 0x0002 /* (sender, message) */
12 #define LU_SECUREMSG 0x0003 /* (sender, message) */
13 #define LU_CHANMSG 0x0004 /* (sender, target, message) */
14 #define LU_CHANNOTICE 0x0005 /* (sender, target, message) */
15 #define LU_INVITE 0x0006 /* (sender, channel) */
16 #define LU_KICKED 0x0007 /* (kicker, channel, reason) */
17 #define LU_KILLED 0x0010 /* () */
18 #define LU_STATS 0x0020 /* (server, numeric, data) */
19 #define LU_STATS_END 0x0021 /* server */
21 /* Callback function for privmsg etc. */
22 typedef void (*UserMessageHandler
)(nick
*,int,void **);
24 extern UserMessageHandler umhandlers
[MAXLOCALUSER
+1];
26 #define registerlocaluser(nickname, ident, host, realname, authname, umodes, handler) registerlocaluserflags(nickname, ident, host, realname, authname, 0, 0, umodes, handler)
27 nick
*registerlocaluserflags(char *nickname
, char *ident
, char *host
, char *realname
, char *authname
, unsigned long authid
, flag_t accountflags
, flag_t umodes
, UserMessageHandler hander
);
28 int renamelocaluser(nick
*np
, char *newnick
);
29 int deregisterlocaluser(nick
*np
, char *reason
);
30 UserMessageHandler
hooklocaluserhandler(nick
*np
, UserMessageHandler newhandler
);
31 void sendnickmsg(nick
*np
);
32 void sendnickburst(int hooknum
, void *arg
);
33 int handleprivatemsgcmd(void *source
, int cargc
, char **cargv
);
34 int handleprivatenoticecmd(void *source
, int cargc
, char **cargv
);
35 int handlemessageornotice(void *source
, int cargc
, char **cargv
, int isnotice
);
36 void sendmessagetouser(nick
*source
, nick
*target
, char *format
, ... );
37 void sendsecuremessagetouser(nick
*source
, nick
*target
, char *servername
, char *format
, ... );
38 void sendnoticetouser(nick
*source
, nick
*target
, char *format
, ... );
39 void killuser(nick
*source
, nick
*target
, char *format
, ... );
40 void localusersetaccount(nick
*np
, char *accname
, unsigned long accid
, u_int64_t accountflags
, time_t authTS
);
41 void localusersetumodes(nick
*np
, flag_t newmodes
);
42 void sethostuser(nick
*target
, char *ident
, char *host
);
43 void localusersetaccountflags(authname
*anp
, u_int64_t accountflags
);