[1] | 1 | // Copyright (c) Athena Dev Teams - Licensed under GNU GPL |
---|
| 2 | // For more information, see LICENCE in the main folder |
---|
| 3 | |
---|
| 4 | #ifndef _IRC_H_ |
---|
| 5 | #define _IRC_H_ |
---|
| 6 | |
---|
| 7 | //#include "map.h" |
---|
| 8 | struct map_session_data; |
---|
| 9 | |
---|
| 10 | // IRC .conf file [Zido] |
---|
| 11 | #define IRC_CONF "irc_athena.conf" |
---|
| 12 | |
---|
| 13 | // IRC Access levels [Zido] |
---|
| 14 | #define ACCESS_OWNER 5 |
---|
| 15 | #define ACCESS_SOP 4 |
---|
| 16 | #define ACCESS_OP 3 |
---|
| 17 | #define ACCESS_HOP 2 |
---|
| 18 | #define ACCESS_VOICE 1 |
---|
| 19 | #define ACCESS_NORM 0 |
---|
| 20 | |
---|
| 21 | #define MAX_CHANNEL_USERS 500 |
---|
| 22 | |
---|
| 23 | extern short use_irc; |
---|
| 24 | |
---|
| 25 | extern short irc_announce_flag; |
---|
| 26 | extern short irc_announce_mvp_flag; |
---|
| 27 | extern short irc_announce_shop_flag; |
---|
| 28 | extern short irc_announce_jobchange_flag; |
---|
| 29 | |
---|
| 30 | void irc_announce(const char* buf); |
---|
| 31 | void irc_announce_jobchange(struct map_session_data *sd); |
---|
| 32 | void irc_announce_shop(struct map_session_data *sd,int flag); |
---|
| 33 | void irc_announce_mvp(struct map_session_data *sd, struct mob_data *md); |
---|
| 34 | |
---|
| 35 | int irc_parse(int fd); |
---|
| 36 | void do_final_irc(void); |
---|
| 37 | void do_init_irc(void); |
---|
| 38 | void irc_send(char *buf); |
---|
| 39 | void irc_parse_sub(int fd, char *incoming_string); |
---|
| 40 | int send_to_parser(int fd, char *input,char key[2]); |
---|
| 41 | struct IRC_Session_Info { |
---|
| 42 | int state; |
---|
| 43 | int fd; |
---|
| 44 | char username[30]; |
---|
| 45 | char password[33]; |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | typedef struct IRC_Session_Info IRC_SI; |
---|
| 49 | |
---|
| 50 | struct channel_data { |
---|
| 51 | struct { |
---|
| 52 | char name[256]; |
---|
| 53 | int level; |
---|
| 54 | }user[MAX_CHANNEL_USERS]; |
---|
| 55 | }; |
---|
| 56 | |
---|
| 57 | int parse_names_packet(char *str); // [Zido] |
---|
| 58 | int parse_names(char *str); // [Zido] |
---|
| 59 | int set_access(char *nick,int level); // [Zido] |
---|
| 60 | int get_access(char *nick); // [Zido] |
---|
| 61 | int irc_rmnames(void); // [Zido] |
---|
| 62 | int irc_read_conf(char *file); // [Zido] |
---|
| 63 | |
---|
| 64 | #endif /* _IRC_H_ */ |
---|