Mercurial > pidgin
annotate src/protocols/irc/irc.h @ 13545:cfc2f7fcb3dd
[gaim-migrate @ 15922]
Way more changes that I initially thought I was going to make. I apologize
for the commit message spam. These changes bring a lot of consistency to
our capitalization and punctuation, especially of words like "e-mail".
For reference, I've used these rules (after discussing in #gaim):
e-mail, a case of two words joined:
"e-mail" - in the middle of a sentence caps context
"E-mail" - start of text in a sentence caps context
"E-Mail" - in a header (title) caps context
re-enable, a single word, would be:
"re-enable", "Re-enable", and "Re-enable" (respectively)
The reason this changeset exploded is that, as I went through and verified
these changes, I realized we were using improper capitalization (e.g. header
instead of sentence) in a number of dialogs. I fixed a number of these
cases before, and this corrects another pile.
This looks like I've made a LOT of work for the translators, but the impact
is significantly mitigated by three factors: 1) Many of these changes use
strings that already exist, or change one string in many places. 2) I've
used sed to correct the .po files where possible. 3) The actual changes
are extremely trivial.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Tue, 21 Mar 2006 04:32:45 +0000 |
| parents | 33bef17125c2 |
| children | 5d5e249c488e |
| rev | line source |
|---|---|
| 6333 | 1 /** |
| 2 * @file irc.h | |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12210
diff
changeset
|
3 * |
| 6333 | 4 * gaim |
| 5 * | |
| 6 * Copyright (C) 2003, Ethan Blanton <eblanton@cs.purdue.edu> | |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12210
diff
changeset
|
7 * |
| 6333 | 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 | |
|
12143
cbebda5f019c
[gaim-migrate @ 14444]
Richard Laager <rlaager@wiktel.com>
parents:
12013
diff
changeset
|
28 #include "ft.h" |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12210
diff
changeset
|
29 #include "gaim_buffer.h" |
| 8114 | 30 #include "roomlist.h" |
| 10365 | 31 #include "sslconn.h" |
| 6333 | 32 |
| 33 #define IRC_DEFAULT_SERVER "irc.freenode.net" | |
| 34 #define IRC_DEFAULT_PORT 6667 | |
| 10365 | 35 #define IRC_DEFAULT_SSL_PORT 994 |
| 6333 | 36 |
| 37 #define IRC_DEFAULT_CHARSET "UTF-8" | |
| 38 #define IRC_DEFAULT_ALIAS "gaim" | |
| 39 | |
| 11763 | 40 #define IRC_DEFAULT_QUIT "Leaving." |
| 11073 | 41 |
| 6333 | 42 #define IRC_INITIAL_BUFSIZE 1024 |
| 43 | |
| 8351 | 44 |
| 6333 | 45 enum { IRC_USEROPT_SERVER, IRC_USEROPT_PORT, IRC_USEROPT_CHARSET }; |
| 46 enum irc_state { IRC_STATE_NEW, IRC_STATE_ESTABLISHED }; | |
| 47 | |
| 48 struct irc_conn { | |
| 49 GaimAccount *account; | |
| 50 GHashTable *msgs; | |
| 51 GHashTable *cmds; | |
| 52 char *server; | |
| 53 int fd; | |
| 54 guint timer; | |
| 55 GHashTable *buddies; | |
| 56 | |
| 57 char *inbuf; | |
| 58 int inbuflen; | |
| 59 int inbufused; | |
| 60 | |
| 61 GString *motd; | |
| 62 GString *names; | |
| 63 char *nameconv; | |
| 64 struct _whois { | |
| 65 char *nick; | |
| 66 char *away; | |
| 67 char *userhost; | |
| 68 char *name; | |
| 69 char *server; | |
| 70 char *serverinfo; | |
| 71 char *channels; | |
| 72 int ircop; | |
| 73 int identified; | |
| 74 int idle; | |
| 75 time_t signon; | |
| 76 } whois; | |
| 8114 | 77 GaimRoomlist *roomlist; |
| 10365 | 78 GaimSslConnection *gsc; |
| 9440 | 79 |
| 80 gboolean quitting; | |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12210
diff
changeset
|
81 |
|
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12210
diff
changeset
|
82 GaimCircBuffer *outbuf; |
|
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12210
diff
changeset
|
83 guint writeh; |
| 6333 | 84 }; |
| 85 | |
| 86 struct irc_buddy { | |
| 87 char *name; | |
| 88 gboolean online; | |
| 89 gboolean flag; | |
| 90 }; | |
| 91 | |
| 92 typedef int (*IRCCmdCallback) (struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 93 | |
| 94 int irc_send(struct irc_conn *irc, const char *buf); | |
| 95 gboolean irc_blist_timeout(struct irc_conn *irc); | |
| 96 | |
| 97 char *irc_mirc2html(const char *string); | |
| 8529 | 98 char *irc_mirc2txt(const char *string); |
| 6333 | 99 |
| 10208 | 100 gboolean irc_ischannel(const char *string); |
| 101 | |
| 9130 | 102 void irc_register_commands(void); |
| 6333 | 103 void irc_msg_table_build(struct irc_conn *irc); |
| 104 void irc_parse_msg(struct irc_conn *irc, char *input); | |
| 105 char *irc_parse_ctcp(struct irc_conn *irc, const char *from, const char *to, const char *msg, int notice); | |
| 106 char *irc_format(struct irc_conn *irc, const char *format, ...); | |
| 107 | |
| 108 void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 109 void irc_msg_away(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 110 void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 10633 | 111 void irc_msg_badnick(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 10659 | 112 void irc_msg_banfull(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 113 void irc_msg_banned(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 114 void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 115 void irc_msg_endwhois(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 116 void irc_msg_endmotd(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 117 void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 118 void irc_msg_inviteonly(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 119 void irc_msg_ison(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 120 void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 121 void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 8114 | 122 void irc_msg_list(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 123 void irc_msg_mode(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 124 void irc_msg_motd(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 125 void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 126 void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 127 void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 7877 | 128 void irc_msg_nochan(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 129 void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6718 | 130 void irc_msg_nochangenick(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 131 void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 132 void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 133 void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 134 void irc_msg_notop(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 135 void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 136 void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 137 void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 138 void irc_msg_privmsg(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 6714 | 139 void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 140 void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 10564 | 141 void irc_msg_time(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 142 void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 10712 | 143 void irc_msg_unavailable(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 6333 | 144 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args); |
| 145 void irc_msg_wallops(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 146 void irc_msg_whois(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 147 | |
| 148 void irc_msg_ignore(struct irc_conn *irc, const char *name, const char *from, char **args); | |
| 149 | |
| 150 void irc_cmd_table_build(struct irc_conn *irc); | |
| 151 | |
| 152 int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 153 int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 154 int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 155 int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 156 int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 157 int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 8114 | 158 int irc_cmd_list(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
| 6333 | 159 int irc_cmd_mode(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
| 160 int irc_cmd_names(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 161 int irc_cmd_nick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 162 int irc_cmd_op(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 163 int irc_cmd_privmsg(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 164 int irc_cmd_part(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 165 int irc_cmd_ping(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 166 int irc_cmd_quit(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 167 int irc_cmd_quote(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 168 int irc_cmd_query(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 169 int irc_cmd_remove(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 12210 | 170 int irc_cmd_service(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
| 10564 | 171 int irc_cmd_time(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
| 6333 | 172 int irc_cmd_topic(struct irc_conn *irc, const char *cmd, const char *target, const char **args); |
| 173 int irc_cmd_wallops(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 174 int irc_cmd_whois(struct irc_conn *irc, const char *cmd, const char *target, const char **args); | |
| 175 | |
|
12143
cbebda5f019c
[gaim-migrate @ 14444]
Richard Laager <rlaager@wiktel.com>
parents:
12013
diff
changeset
|
176 GaimXfer *irc_dccsend_new_xfer(GaimConnection *gc, const char *who); |
| 9466 | 177 void irc_dccsend_send_file(GaimConnection *gc, const char *who, const char *file); |
| 8351 | 178 void irc_dccsend_recv(struct irc_conn *irc, const char *from, const char *msg); |
| 6333 | 179 #endif /* _GAIM_IRC_H */ |
