comparison src/protocols/irc/irc.c @ 2123:56c4382f2909

[gaim-migrate @ 2133] now has the ability to notify you beforehand that messages are too long. I haven't tested this yet though. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 06 Aug 2001 17:50:46 +0000
parents a93aeb6f813d
children acc11216ec5d
comparison
equal deleted inserted replaced
2122:c99c781e5931 2123:56c4382f2909
160 } 160 }
161 write(idata->fd, "\n", 1); 161 write(idata->fd, "\n", 1);
162 } 162 }
163 163
164 164
165 static void irc_send_im(struct gaim_connection *gc, char *who, char *message, int away) 165 static int irc_send_im(struct gaim_connection *gc, char *who, char *message, int away)
166 { 166 {
167 167
168 struct irc_data *idata = (struct irc_data *)gc->proto_data; 168 struct irc_data *idata = (struct irc_data *)gc->proto_data;
169 gchar *buf = (gchar *) g_malloc(IRC_BUF_LEN + 1); 169 gchar *buf = (gchar *) g_malloc(IRC_BUF_LEN + 1);
170 170
193 gchar *temp = (gchar *) g_malloc(IRC_BUF_LEN + 1); 193 gchar *temp = (gchar *) g_malloc(IRC_BUF_LEN + 1);
194 strcpy(temp, message + 7); 194 strcpy(temp, message + 7);
195 irc_get_info(gc, temp); 195 irc_get_info(gc, temp);
196 g_free(temp); 196 g_free(temp);
197 197
198 return; 198 return 0;
199 } 199 }
200 200
201 } else { 201 } else {
202 g_snprintf(buf, IRC_BUF_LEN, "PRIVMSG %s :%s\n", who, message); 202 g_snprintf(buf, IRC_BUF_LEN, "PRIVMSG %s :%s\n", who, message);
203 } 203 }
204 204
205 write(idata->fd, buf, strlen(buf)); 205 write(idata->fd, buf, strlen(buf));
206 206
207 g_free(buf); 207 g_free(buf);
208 return 0;
208 } 209 }
209 210
210 static int find_id_by_name(struct gaim_connection *gc, char *name) 211 static int find_id_by_name(struct gaim_connection *gc, char *name)
211 { 212 {
212 gchar *temp = (gchar *) g_malloc(IRC_BUF_LEN + 1); 213 gchar *temp = (gchar *) g_malloc(IRC_BUF_LEN + 1);