Mercurial > pidgin.yaz
annotate src/protocols/irc/irc.h @ 8114:7a6e30eb7aad
[gaim-migrate @ 8818]
Thanks to Tim Ringenbach for this IRC chat list.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Thu, 15 Jan 2004 22:53:07 +0000 |
parents | 828856b7fe30 |
children | ffa642240fc1 |
rev | line source |
---|---|
6333 | 1 /** |
2 * @file irc.h | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003, Ethan Blanton <eblanton@cs.purdue.edu> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 | |
23 #ifndef _GAIM_IRC_H | |
24 #define _GAIM_IRC_H | |
25 | |
26 #include <glib.h> | |
27 | |
28 #include "multi.h" | |
8114 | 29 #include "roomlist.h" |
6333 | 30 |
31 #define IRC_DEFAULT_SERVER "irc.freenode.net" | |
32 #define IRC_DEFAULT_PORT 6667 | |
33 | |
34 #define IRC_DEFAULT_CHARSET "UTF-8" | |
35 #define IRC_DEFAULT_ALIAS "gaim" | |
36 | |
37 #define IRC_INITIAL_BUFSIZE 1024 | |
38 | |
39 enum { IRC_USEROPT_SERVER, IRC_USEROPT_PORT, IRC_USEROPT_CHARSET }; | |
40 enum irc_state { IRC_STATE_NEW, IRC_STATE_ESTABLISHED }; | |
41 | |
42 struct irc_conn { | |
43 GaimAccount *account; | |
44 GHashTable *msgs; | |
45 GHashTable *cmds; | |
46 char *server; | |
47 int fd; | |
48 guint timer; | |
49 GHashTable *buddies; | |
50 | |
51 char *inbuf; | |
52 int inbuflen; | |
53 int inbufused; | |
54 | |
55 GString *motd; | |
56 GString *names; | |
57 char *nameconv; | |
58 struct _whois { | |
59 char *nick; | |
60 char *away; | |
61 char *userhost; | |
62 char *name; | |
63 char *server; | |
64 char *serverinfo; | |
65 char *channels; | |
66 int ircop; | |
67 int identified; | |
68 int idle; | |
69 time_t signon; | |
70 } whois; | |
8114 | 71 GaimRoomlist *roomlist; |
6333 | 72 }; |
73 | |
74 struct irc_buddy { | |
75 char *name; | |
76 gboolean online; | |
77 gboolean flag; | |
78 }; | |
79 | |
80 typedef int (*IRCCmdCallback) (struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
81 | |
82 int irc_send(struct irc_conn *irc, const char *buf); | |
83 gboolean irc_blist_timeout(struct irc_conn *irc); | |
84 | |
85 char *irc_mirc2html(const char *string); | |
86 | |
87 void irc_msg_table_build(struct irc_conn *irc); | |
88 void irc_parse_msg(struct irc_conn *irc, char *input); | |
89 int irc_parse_cmd(struct irc_conn *irc, const char *target, const char *cmdstr); | |
90 char *irc_parse_ctcp(struct irc_conn *irc, const char *from, const char *to, const char *msg, int notice); | |
91 char *irc_format(struct irc_conn *irc, const char *format, ...); | |
92 | |
93 void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args); | |
94 void irc_msg_away(struct irc_conn *irc, const char *name, const char *from, char **args); | |
95 void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args); | |
96 void irc_msg_banned(struct irc_conn *irc, const char *name, const char *from, char **args); | |
97 void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args); | |
98 void irc_msg_endwhois(struct irc_conn *irc, const char *name, const char *from, char **args); | |
99 void irc_msg_endmotd(struct irc_conn *irc, const char *name, const char *from, char **args); | |
100 void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args); | |
101 void irc_msg_inviteonly(struct irc_conn *irc, const char *name, const char *from, char **args); | |
102 void irc_msg_ison(struct irc_conn *irc, const char *name, const char *from, char **args); | |
103 void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char **args); | |
104 void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args); | |
8114 | 105 void irc_msg_list(struct irc_conn *irc, const char *name, const char *from, char **args); |
6333 | 106 void irc_msg_mode(struct irc_conn *irc, const char *name, const char *from, char **args); |
107 void irc_msg_motd(struct irc_conn *irc, const char *name, const char *from, char **args); | |
108 void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char **args); | |
109 void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args); | |
110 void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args); | |
7877 | 111 void irc_msg_nochan(struct irc_conn *irc, const char *name, const char *from, char **args); |
6333 | 112 void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args); |
6718 | 113 void irc_msg_nochangenick(struct irc_conn *irc, const char *name, const char *from, char **args); |
6333 | 114 void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args); |
115 void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args); | |
116 void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args); | |
117 void irc_msg_notop(struct irc_conn *irc, const char *name, const char *from, char **args); | |
118 void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char **args); | |
119 void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args); | |
120 void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args); | |
121 void irc_msg_privmsg(struct irc_conn *irc, const char *name, const char *from, char **args); | |
6714 | 122 void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args); |
6333 | 123 void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args); |
124 void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args); | |
125 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args); | |
126 void irc_msg_wallops(struct irc_conn *irc, const char *name, const char *from, char **args); | |
127 void irc_msg_whois(struct irc_conn *irc, const char *name, const char *from, char **args); | |
128 | |
129 void irc_msg_ignore(struct irc_conn *irc, const char *name, const char *from, char **args); | |
130 | |
131 void irc_cmd_table_build(struct irc_conn *irc); | |
132 | |
133 int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
134 int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
135 int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
6415
e3be6b9744b7
[gaim-migrate @ 6922]
Christian Hammond <chipx86@chipx86.com>
parents:
6333
diff
changeset
|
136 int irc_cmd_help(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
6333 | 137 int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
138 int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
139 int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
8114 | 140 int irc_cmd_list(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
6333 | 141 int irc_cmd_mode(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
142 int irc_cmd_names(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
143 int irc_cmd_nick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
144 int irc_cmd_op(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
145 int irc_cmd_privmsg(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
146 int irc_cmd_part(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
147 int irc_cmd_ping(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
148 int irc_cmd_quit(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
149 int irc_cmd_quote(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
150 int irc_cmd_query(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
151 int irc_cmd_remove(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
152 int irc_cmd_topic(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
153 int irc_cmd_wallops(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
154 int irc_cmd_whois(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
155 | |
156 #endif /* _GAIM_IRC_H */ |