Mercurial > pidgin.yaz
annotate src/protocols/irc/msgs.c @ 9558:f1137cf462d8
[gaim-migrate @ 10394]
some _() updates from Ambrose C. LI
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 18 Jul 2004 18:47:20 +0000 |
parents | 8b2451878e26 |
children | f4654d3b7b8d |
rev | line source |
---|---|
6333 | 1 /** |
2 * @file msgs.c | |
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 #include "internal.h" | |
24 | |
25 #include "conversation.h" | |
26 #include "blist.h" | |
27 #include "notify.h" | |
28 #include "util.h" | |
29 #include "debug.h" | |
30 #include "irc.h" | |
31 | |
32 #include <stdio.h> | |
33 | |
34 static char *irc_mask_nick(const char *mask); | |
35 static char *irc_mask_userhost(const char *mask); | |
36 static void irc_chat_remove_buddy(GaimConversation *convo, char *data[2]); | |
37 static void irc_buddy_status(char *name, struct irc_buddy *ib, struct irc_conn *irc); | |
38 | |
39 static char *irc_mask_nick(const char *mask) | |
40 { | |
41 char *end, *buf; | |
42 | |
43 end = strchr(mask, '!'); | |
44 if (!end) | |
45 buf = g_strdup(mask); | |
46 else | |
47 buf = g_strndup(mask, end - mask); | |
48 | |
49 return buf; | |
50 } | |
51 | |
52 static char *irc_mask_userhost(const char *mask) | |
53 { | |
54 return g_strdup(strchr(mask, '!') + 1); | |
55 } | |
56 | |
57 static void irc_chat_remove_buddy(GaimConversation *convo, char *data[2]) | |
58 { | |
59 char *message = g_strdup_printf("quit: %s", data[1]); | |
60 | |
9554 | 61 if (gaim_conv_chat_find_user(GAIM_CONV_CHAT(convo), data[0])) |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
62 gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), data[0], message); |
6333 | 63 |
64 g_free(message); | |
65 } | |
66 | |
67 void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args) | |
68 { | |
69 gaim_debug(GAIM_DEBUG_INFO, "irc", "Unrecognized message: %s\n", args[0]); | |
70 } | |
71 | |
72 void irc_msg_away(struct irc_conn *irc, const char *name, const char *from, char **args) | |
73 { | |
74 GaimConnection *gc; | |
75 | |
76 if (!args || !args[1]) | |
77 return; | |
78 | |
79 if (irc->whois.nick && !gaim_utf8_strcasecmp(irc->whois.nick, args[1])) { | |
80 /* We're doing a whois, show this in the whois dialog */ | |
81 irc_msg_whois(irc, name, from, args); | |
82 return; | |
83 } | |
84 | |
85 gc = gaim_account_get_connection(irc->account); | |
86 if (gc) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
87 serv_got_im(gc, args[1], args[2], GAIM_CONV_IM_AUTO_RESP, time(NULL)); |
6333 | 88 } |
89 | |
90 void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args) | |
91 { | |
92 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
93 | |
94 if (!args || !args[1] || !gc) | |
95 return; | |
96 | |
97 gaim_notify_error(gc, NULL, _("Bad mode"), args[1]); | |
98 } | |
99 | |
100 void irc_msg_banned(struct irc_conn *irc, const char *name, const char *from, char **args) | |
101 { | |
102 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
103 char *buf; | |
104 | |
105 if (!args || !args[1] || !gc) | |
106 return; | |
107 | |
108 buf = g_strdup_printf(_("You are banned from %s."), args[1]); | |
109 gaim_notify_error(gc, _("Banned"), _("Banned"), buf); | |
110 g_free(buf); | |
111 } | |
112 | |
113 void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args) | |
114 { | |
115 GaimConversation *convo; | |
116 char *buf; | |
117 | |
118 if (!args || !args[1] || !args[2]) | |
119 return; | |
120 | |
121 convo = gaim_find_conversation_with_account(args[1], irc->account); | |
122 if (!convo) /* XXX punt on channels we are not in for now */ | |
123 return; | |
124 | |
125 buf = g_strdup_printf("mode for %s: %s %s", args[1], args[2], args[3] ? args[3] : ""); | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
126 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 127 g_free(buf); |
128 | |
129 return; | |
130 } | |
131 | |
132 void irc_msg_whois(struct irc_conn *irc, const char *name, const char *from, char **args) | |
133 { | |
134 if (!irc->whois.nick) { | |
135 gaim_debug(GAIM_DEBUG_WARNING, "irc", "Unexpected WHOIS reply for %s\n", args[1]); | |
136 return; | |
137 } | |
138 | |
139 if (gaim_utf8_strcasecmp(irc->whois.nick, args[1])) { | |
140 gaim_debug(GAIM_DEBUG_WARNING, "irc", "Got WHOIS reply for %s while waiting for %s\n", args[1], irc->whois.nick); | |
141 return; | |
142 } | |
143 | |
144 if (!strcmp(name, "301")) { | |
145 irc->whois.away = g_strdup(args[2]); | |
146 } else if (!strcmp(name, "311")) { | |
147 irc->whois.userhost = g_strdup_printf("%s@%s", args[2], args[3]); | |
148 irc->whois.name = g_strdup(args[5]); | |
149 } else if (!strcmp(name, "312")) { | |
150 irc->whois.server = g_strdup(args[2]); | |
151 irc->whois.serverinfo = g_strdup(args[3]); | |
152 } else if (!strcmp(name, "313")) { | |
153 irc->whois.ircop = 1; | |
154 } else if (!strcmp(name, "317")) { | |
155 irc->whois.idle = atoi(args[2]); | |
156 if (args[3]) | |
157 irc->whois.signon = (time_t)atoi(args[3]); | |
158 } else if (!strcmp(name, "319")) { | |
159 irc->whois.channels = g_strdup(args[2]); | |
160 } else if (!strcmp(name, "320")) { | |
161 irc->whois.identified = 1; | |
162 } | |
163 } | |
164 | |
165 void irc_msg_endwhois(struct irc_conn *irc, const char *name, const char *from, char **args) | |
166 { | |
167 GaimConnection *gc; | |
168 GString *info; | |
7062
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
169 char buffer[256]; |
6333 | 170 char *str; |
171 | |
172 if (!irc->whois.nick) { | |
173 gaim_debug(GAIM_DEBUG_WARNING, "irc", "Unexpected End of WHOIS for %s\n", args[1]); | |
174 return; | |
175 } | |
176 if (gaim_utf8_strcasecmp(irc->whois.nick, args[1])) { | |
177 gaim_debug(GAIM_DEBUG_WARNING, "irc", "Received end of WHOIS for %s, expecting %s\n", args[1], irc->whois.nick); | |
178 return; | |
179 } | |
180 | |
181 info = g_string_new(""); | |
9558 | 182 g_string_append_printf(info, _("<b>%s:</b> %s"), _("Nick"), args[1]); |
183 g_string_append_printf(info, "%s%s<br>", | |
6333 | 184 irc->whois.ircop ? _(" <i>(ircop)</i>") : "", |
185 irc->whois.identified ? _(" <i>(identified)</i>") : ""); | |
186 if (irc->whois.away) { | |
9558 | 187 g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Away"), irc->whois.away); |
6333 | 188 g_free(irc->whois.away); |
189 } | |
190 if (irc->whois.userhost) { | |
9558 | 191 g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Username"), irc->whois.userhost); |
192 g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Realname"), irc->whois.name); | |
6333 | 193 g_free(irc->whois.userhost); |
194 g_free(irc->whois.name); | |
195 } | |
196 if (irc->whois.server) { | |
9558 | 197 g_string_append_printf(info, _("<b>%s:</b> %s"), _("Server"), irc->whois.server); |
198 g_string_append_printf(info, " (%s)<br>", irc->whois.serverinfo); | |
6333 | 199 g_free(irc->whois.server); |
200 g_free(irc->whois.serverinfo); | |
201 } | |
202 if (irc->whois.channels) { | |
9558 | 203 g_string_append_printf(info, _("<b>%s:</b> %s<br>"), _("Currently on"), irc->whois.channels); |
6333 | 204 g_free(irc->whois.channels); |
205 } | |
206 if (irc->whois.idle) { | |
7108
6faeeecab0dc
[gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents:
7062
diff
changeset
|
207 gchar *timex = gaim_str_seconds_to_string(irc->whois.idle); |
6357 | 208 g_string_append_printf(info, _("<b>Idle for:</b> %s<br>"), timex); |
209 g_free(timex); | |
9558 | 210 g_string_append_printf(info, _("<b>%s:</b> %s"), _("Online since"), ctime(&irc->whois.signon)); |
6333 | 211 } |
212 if (!strcmp(irc->whois.nick, "Paco-Paco")) { | |
213 g_string_append_printf(info, _("<br><b>Defining adjective:</b> Glorious<br>")); | |
214 } | |
215 | |
216 gc = gaim_account_get_connection(irc->account); | |
217 str = g_string_free(info, FALSE); | |
7062
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
218 |
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
219 g_snprintf(buffer, sizeof(buffer), |
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
220 _("Buddy Information for %s"), irc->whois.nick); |
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
221 gaim_notify_formatted(gc, NULL, buffer, NULL, str, NULL, NULL); |
86ed8b2aa665
[gaim-migrate @ 7626]
Christian Hammond <chipx86@chipx86.com>
parents:
6982
diff
changeset
|
222 |
6333 | 223 g_free(str); |
224 memset(&irc->whois, 0, sizeof(irc->whois)); | |
225 } | |
226 | |
8114 | 227 void irc_msg_list(struct irc_conn *irc, const char *name, const char *from, char **args) |
228 { | |
229 if (!irc->roomlist) | |
230 return; | |
231 | |
232 if (!strcmp(name, "321")) { | |
233 gaim_roomlist_set_in_progress(irc->roomlist, TRUE); | |
234 return; | |
235 } | |
236 | |
237 if (!strcmp(name, "323")) { | |
238 gaim_roomlist_set_in_progress(irc->roomlist, FALSE); | |
239 gaim_roomlist_unref(irc->roomlist); | |
240 irc->roomlist = NULL; | |
241 } | |
242 | |
243 if (!strcmp(name, "322")) { | |
244 GaimRoomlistRoom *room; | |
245 | |
246 if (!args[0] || !args[1] || !args[2] || !args[3]) | |
247 return; | |
248 | |
249 room = gaim_roomlist_room_new(GAIM_ROOMLIST_ROOMTYPE_ROOM, args[1], NULL); | |
250 gaim_roomlist_room_add_field(irc->roomlist, room, args[1]); | |
251 gaim_roomlist_room_add_field(irc->roomlist, room, GINT_TO_POINTER(strtol(args[2], NULL, 10))); | |
252 gaim_roomlist_room_add_field(irc->roomlist, room, args[3]); | |
253 gaim_roomlist_room_add(irc->roomlist, room); | |
254 } | |
255 } | |
256 | |
6333 | 257 void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args) |
258 { | |
8504 | 259 char *chan, *topic, *msg, *nick, *tmp; |
6333 | 260 GaimConversation *convo; |
261 | |
262 if (!strcmp(name, "topic")) { | |
263 chan = args[0]; | |
8529 | 264 topic = irc_mirc2txt (args[1]); |
6333 | 265 } else { |
266 chan = args[1]; | |
8529 | 267 topic = irc_mirc2txt (args[2]); |
6333 | 268 } |
269 | |
270 convo = gaim_find_conversation_with_account(chan, irc->account); | |
271 if (!convo) { | |
272 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); | |
273 } | |
9518 | 274 |
6333 | 275 /* If this is an interactive update, print it out */ |
8504 | 276 tmp = gaim_escape_html(topic); |
6333 | 277 if (!strcmp(name, "topic")) { |
278 nick = irc_mask_nick(from); | |
9518 | 279 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), nick, topic); |
8504 | 280 msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp); |
6333 | 281 g_free(nick); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
282 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
6333 | 283 g_free(msg); |
284 } else { | |
8504 | 285 msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp); |
9518 | 286 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
287 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
6333 | 288 g_free(msg); |
289 } | |
8504 | 290 g_free(tmp); |
8529 | 291 g_free(topic); |
6333 | 292 } |
293 | |
294 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args) | |
295 { | |
296 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
297 char *buf; | |
298 | |
299 if (!args || !args[1] || !gc) | |
300 return; | |
301 | |
302 buf = g_strdup_printf(_("Unknown message '%s'"), args[1]); | |
303 gaim_notify_error(gc, _("Unknown message"), buf, _("Gaim has sent a message the IRC server did not understand.")); | |
304 g_free(buf); | |
305 } | |
306 | |
307 void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char **args) | |
308 { | |
309 char *names, *cur, *end, *tmp, *msg; | |
310 GaimConversation *convo; | |
311 | |
312 if (!strcmp(name, "366")) { | |
313 convo = gaim_find_conversation_with_account(irc->nameconv ? irc->nameconv : args[1], irc->account); | |
314 if (!convo) { | |
315 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a NAMES list for %s, which doesn't exist\n", args[2]); | |
316 g_string_free(irc->names, TRUE); | |
317 irc->names = NULL; | |
318 g_free(irc->nameconv); | |
319 irc->nameconv = NULL; | |
320 return; | |
321 } | |
322 | |
323 names = cur = g_string_free(irc->names, FALSE); | |
324 irc->names = NULL; | |
325 if (irc->nameconv) { | |
9274 | 326 msg = g_strdup_printf(_("Users on %s: %s"), args[1], names); |
6333 | 327 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
328 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 329 else |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
330 gaim_conv_im_write(GAIM_CONV_IM(convo), "", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 331 g_free(msg); |
332 g_free(irc->nameconv); | |
333 irc->nameconv = NULL; | |
334 } else { | |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
335 GList *users = NULL; |
9554 | 336 GList *flags = NULL; |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
337 |
6333 | 338 while (*cur) { |
9554 | 339 GaimConvChatBuddyFlags f = GAIM_CBFLAGS_NONE; |
6333 | 340 end = strchr(cur, ' '); |
341 if (!end) | |
342 end = cur + strlen(cur); | |
9554 | 343 if (*cur == '@') { |
344 f = GAIM_CBFLAGS_OP; | |
6333 | 345 cur++; |
9554 | 346 } else if (*cur == '%') { |
347 f = GAIM_CBFLAGS_HALFOP; | |
348 cur++; | |
349 } else if(*cur == '+') { | |
350 f = GAIM_CBFLAGS_VOICE; | |
351 cur++; | |
352 } | |
6333 | 353 tmp = g_strndup(cur, end - cur); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
354 users = g_list_append(users, tmp); |
9554 | 355 flags = g_list_append(flags, GINT_TO_POINTER(f)); |
6333 | 356 cur = end; |
357 if (*cur) | |
358 cur++; | |
359 } | |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
360 |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
361 if (users != NULL) { |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
362 GList *l; |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
363 |
9554 | 364 gaim_conv_chat_add_users(GAIM_CONV_CHAT(convo), users, flags); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
365 |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
366 for (l = users; l != NULL; l = l->next) |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
367 g_free(l->data); |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
368 |
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
369 g_list_free(users); |
9554 | 370 g_list_free(flags); |
6407
ba0b99a72be2
[gaim-migrate @ 6913]
Christian Hammond <chipx86@chipx86.com>
parents:
6357
diff
changeset
|
371 } |
6333 | 372 } |
373 g_free(names); | |
374 } else { | |
375 if (!irc->names) | |
376 irc->names = g_string_new(""); | |
377 | |
378 irc->names = g_string_append(irc->names, args[3]); | |
379 } | |
380 } | |
381 | |
382 void irc_msg_motd(struct irc_conn *irc, const char *name, const char *from, char **args) | |
383 { | |
384 GaimConnection *gc; | |
385 if (!strcmp(name, "375")) { | |
386 gc = gaim_account_get_connection(irc->account); | |
387 if (gc) | |
388 gaim_connection_set_display_name(gc, args[0]); | |
389 } | |
390 | |
391 if (!irc->motd) | |
392 irc->motd = g_string_new(""); | |
393 | |
394 g_string_append_printf(irc->motd, "%s<br>", args[1]); | |
395 } | |
396 | |
397 void irc_msg_endmotd(struct irc_conn *irc, const char *name, const char *from, char **args) | |
398 { | |
399 GaimConnection *gc; | |
400 | |
401 gc = gaim_account_get_connection(irc->account); | |
402 if (!gc) | |
403 return; | |
404 | |
405 gaim_connection_set_state(gc, GAIM_CONNECTED); | |
9057 | 406 serv_finish_login (gc); |
6333 | 407 |
408 irc_blist_timeout(irc); | |
8872 | 409 if (!irc->timer) |
410 irc->timer = gaim_timeout_add(45000, (GSourceFunc)irc_blist_timeout, (gpointer)irc); | |
6333 | 411 } |
412 | |
7877 | 413 void irc_msg_nochan(struct irc_conn *irc, const char *name, const char *from, char **args) |
414 { | |
415 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
416 | |
417 if (gc == NULL || args == NULL || args[1] == NULL) | |
418 return; | |
419 | |
420 gaim_notify_error(gc, NULL, _("No such channel"), args[1]); | |
421 } | |
422 | |
6333 | 423 void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args) |
424 { | |
425 GaimConnection *gc; | |
426 GaimConversation *convo; | |
427 | |
428 convo = gaim_find_conversation_with_account(args[1], irc->account); | |
429 if (convo) { | |
430 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) /* does this happen? */ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
431 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], _("no such channel"), |
6621 | 432 GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 433 else |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
434 gaim_conv_im_write(GAIM_CONV_IM(convo), args[1], _("User is not logged in"), |
6621 | 435 GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 436 } else { |
437 if ((gc = gaim_account_get_connection(irc->account)) == NULL) | |
438 return; | |
439 gaim_notify_error(gc, NULL, _("No such nick or channel"), args[1]); | |
440 } | |
441 | |
442 if (irc->whois.nick && !gaim_utf8_strcasecmp(irc->whois.nick, args[1])) { | |
443 g_free(irc->whois.nick); | |
444 irc->whois.nick = NULL; | |
445 } | |
446 } | |
447 | |
448 void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args) | |
449 { | |
450 GaimConnection *gc; | |
451 GaimConversation *convo; | |
452 | |
453 convo = gaim_find_conversation_with_account(args[1], irc->account); | |
454 if (convo) { | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
455 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 456 } else { |
457 if ((gc = gaim_account_get_connection(irc->account)) == NULL) | |
458 return; | |
459 gaim_notify_error(gc, NULL, _("Could not send"), args[2]); | |
460 } | |
461 } | |
462 | |
463 void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args) | |
464 { | |
465 GaimConversation *convo = gaim_find_conversation_with_account(args[1], irc->account); | |
466 | |
467 gaim_debug(GAIM_DEBUG_INFO, "irc", "We're apparently not in %s, but tried to use it\n", args[1]); | |
468 if (convo) { | |
469 /*g_slist_remove(irc->gc->buddy_chats, convo); | |
470 gaim_conversation_set_account(convo, NULL);*/ | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
471 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[1], args[2], GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 472 } |
473 } | |
474 | |
475 void irc_msg_notop(struct irc_conn *irc, const char *name, const char *from, char **args) | |
476 { | |
477 GaimConversation *convo; | |
478 | |
479 if (!args || !args[1] || !args[2]) | |
480 return; | |
481 | |
482 convo = gaim_find_conversation_with_account(args[1], irc->account); | |
483 if (!convo) | |
484 return; | |
485 | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
486 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", args[2], GAIM_MESSAGE_SYSTEM, time(NULL)); |
6333 | 487 } |
488 | |
489 void irc_msg_invite(struct irc_conn *irc, const char *name, const char *from, char **args) | |
490 { | |
491 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
492 GHashTable *components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); | |
493 char *nick = irc_mask_nick(from); | |
494 | |
495 if (!args || !args[1] || !gc) { | |
496 g_free(nick); | |
497 g_hash_table_destroy(components); | |
498 return; | |
499 } | |
500 | |
501 g_hash_table_insert(components, strdup("channel"), strdup(args[1])); | |
502 | |
503 serv_got_chat_invite(gc, args[1], nick, NULL, components); | |
504 g_free(nick); | |
505 } | |
506 | |
507 void irc_msg_inviteonly(struct irc_conn *irc, const char *name, const char *from, char **args) | |
508 { | |
509 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
510 char *buf; | |
511 | |
512 if (!args || !args[1] || !gc) | |
513 return; | |
514 | |
515 buf = g_strdup_printf(_("Joining %s requires an invitation."), args[1]); | |
516 gaim_notify_error(gc, _("Invitation only"), _("Invitation only"), buf); | |
517 g_free(buf); | |
518 } | |
519 | |
520 void irc_msg_ison(struct irc_conn *irc, const char *name, const char *from, char **args) | |
521 { | |
522 char **nicks; | |
523 struct irc_buddy *ib; | |
524 int i; | |
525 | |
526 if (!args || !args[1]) | |
527 return; | |
528 | |
529 nicks = g_strsplit(args[1], " ", -1); | |
530 | |
531 for (i = 0; nicks[i]; i++) { | |
532 if ((ib = g_hash_table_lookup(irc->buddies, (gconstpointer)nicks[i])) == NULL) { | |
533 continue; | |
534 } | |
535 ib->flag = TRUE; | |
536 } | |
537 | |
6350 | 538 g_strfreev(nicks); |
539 | |
6333 | 540 g_hash_table_foreach(irc->buddies, (GHFunc)irc_buddy_status, (gpointer)irc); |
541 } | |
542 | |
543 static void irc_buddy_status(char *name, struct irc_buddy *ib, struct irc_conn *irc) | |
544 { | |
545 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
6695 | 546 GaimBuddy *buddy = gaim_find_buddy(irc->account, name); |
6333 | 547 |
548 if (!gc || !buddy) | |
549 return; | |
550 | |
551 if (ib->online && !ib->flag) { | |
552 serv_got_update(gc, buddy->name, 0, 0, 0, 0, 0); | |
553 ib->online = FALSE; | |
554 } | |
555 | |
556 if (!ib->online && ib->flag) { | |
557 serv_got_update(gc, buddy->name, 1, 0, 0, 0, 0); | |
558 ib->online = TRUE; | |
559 } | |
560 } | |
561 | |
562 void irc_msg_join(struct irc_conn *irc, const char *name, const char *from, char **args) | |
563 { | |
564 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
565 GaimConversation *convo; | |
566 char *nick = irc_mask_nick(from), *userhost; | |
9238 | 567 struct irc_buddy *ib; |
6333 | 568 static int id = 1; |
569 | |
570 if (!gc) { | |
571 g_free(nick); | |
572 return; | |
573 } | |
574 | |
575 if (!gaim_utf8_strcasecmp(nick, gaim_connection_get_display_name(gc))) { | |
576 /* We are joining a channel for the first time */ | |
577 serv_got_joined_chat(gc, id++, args[0]); | |
578 g_free(nick); | |
579 return; | |
580 } | |
581 | |
582 convo = gaim_find_conversation_with_account(args[0], irc->account); | |
583 if (convo == NULL) { | |
584 gaim_debug(GAIM_DEBUG_ERROR, "irc", "JOIN for %s failed\n", args[0]); | |
585 g_free(nick); | |
586 return; | |
587 } | |
588 | |
589 userhost = irc_mask_userhost(from); | |
9554 | 590 gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), nick, userhost, GAIM_CBFLAGS_NONE); |
9238 | 591 |
592 if ((ib = g_hash_table_lookup(irc->buddies, nick)) != NULL) { | |
593 ib->flag = TRUE; | |
594 irc_buddy_status(nick, ib, irc); | |
595 } | |
596 | |
6333 | 597 g_free(userhost); |
598 g_free(nick); | |
599 } | |
600 | |
601 void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args) | |
602 { | |
603 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
604 GaimConversation *convo = gaim_find_conversation_with_account(args[0], irc->account); | |
605 char *nick = irc_mask_nick(from), *buf; | |
606 | |
607 if (!gc) { | |
608 g_free(nick); | |
609 return; | |
610 } | |
611 | |
612 if (!convo) { | |
613 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Recieved a KICK for unknown channel %s\n", args[0]); | |
614 g_free(nick); | |
615 return; | |
616 } | |
617 | |
618 if (!gaim_utf8_strcasecmp(gaim_connection_get_display_name(gc), args[1])) { | |
619 buf = g_strdup_printf(_("You have been kicked by %s: (%s)"), nick, args[2]); | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
620 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM, time(NULL)); |
6333 | 621 g_free(buf); |
8256
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8186
diff
changeset
|
622 serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo))); |
6333 | 623 } else { |
624 buf = g_strdup_printf(_("Kicked by %s (%s)"), nick, args[2]); | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
625 gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), args[1], buf); |
6333 | 626 g_free(buf); |
627 } | |
628 | |
629 g_free(nick); | |
630 return; | |
631 } | |
632 | |
633 void irc_msg_mode(struct irc_conn *irc, const char *name, const char *from, char **args) | |
634 { | |
635 GaimConversation *convo; | |
636 char *nick = irc_mask_nick(from), *buf; | |
637 | |
638 if (*args[0] == '#' || *args[0] == '&') { /* Channel */ | |
639 convo = gaim_find_conversation_with_account(args[0], irc->account); | |
640 if (!convo) { | |
641 gaim_debug(GAIM_DEBUG_ERROR, "irc", "MODE received for %s, which we are not in\n", args[0]); | |
642 g_free(nick); | |
643 return; | |
644 } | |
645 buf = g_strdup_printf(_("mode (%s %s) by %s"), args[1], args[2] ? args[2] : "", nick); | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
646 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], buf, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 647 g_free(buf); |
9554 | 648 if(args[2]) { |
649 GaimConvChatBuddyFlags newflag, flags; | |
650 char *mcur, *cur, *end, *user; | |
651 gboolean add = FALSE; | |
652 mcur = args[1]; | |
653 cur = args[2]; | |
654 while (*cur && *mcur) { | |
655 if ((*mcur == '+') || (*mcur == '-')) { | |
656 add = (*mcur == '+') ? TRUE : FALSE; | |
657 mcur++; | |
658 continue; | |
659 } | |
660 end = strchr(cur, ' '); | |
661 if (!end) | |
662 end = cur + strlen(cur); | |
663 user = g_strndup(cur, end - cur); | |
664 flags = gaim_conv_chat_user_get_flags(GAIM_CONV_CHAT(convo), user); | |
665 newflag = GAIM_CBFLAGS_NONE; | |
666 if (*mcur == 'o') | |
667 newflag = GAIM_CBFLAGS_OP; | |
668 else if (*mcur =='h') | |
669 newflag = GAIM_CBFLAGS_HALFOP; | |
670 else if (*mcur == 'v') | |
671 newflag = GAIM_CBFLAGS_VOICE; | |
672 if (newflag) { | |
673 if (add) | |
674 flags |= newflag; | |
675 else | |
676 flags &= ~newflag; | |
677 gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(convo), user, flags); | |
678 } | |
679 g_free(user); | |
680 cur = end; | |
681 if (*cur) | |
682 cur++; | |
683 if (*mcur) | |
684 mcur++; | |
685 } | |
686 } | |
6333 | 687 } else { /* User */ |
688 } | |
689 g_free(nick); | |
690 } | |
691 | |
692 void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args) | |
693 { | |
694 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
695 GSList *chats; | |
696 char *nick = irc_mask_nick(from); | |
697 | |
698 if (!gc) { | |
699 g_free(nick); | |
700 return; | |
701 } | |
702 chats = gc->buddy_chats; | |
703 | |
704 if (!gaim_utf8_strcasecmp(nick, gaim_connection_get_display_name(gc))) { | |
705 gaim_connection_set_display_name(gc, args[0]); | |
706 } | |
707 | |
708 while (chats) { | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
709 GaimConvChat *chat = GAIM_CONV_CHAT(chats->data); |
9554 | 710 gaim_conv_chat_rename_user(chat, nick, args[0]); |
6333 | 711 chats = chats->next; |
712 } | |
713 g_free(nick); | |
714 } | |
715 | |
716 void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args) | |
717 { | |
718 char *newnick, *buf, *end; | |
719 | |
720 if (!args || !args[1]) | |
721 return; | |
722 | |
723 newnick = strdup(args[1]); | |
724 end = newnick + strlen(newnick) - 1; | |
725 /* try three fallbacks */ | |
726 if (*end == 2) *end = '3'; | |
727 else if (*end == 1) *end = '2'; | |
728 else *end = '1'; | |
729 | |
730 buf = irc_format(irc, "vn", "NICK", newnick); | |
731 irc_send(irc, buf); | |
732 g_free(buf); | |
733 } | |
734 | |
735 void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args) | |
736 { | |
737 char *newargs[2]; | |
738 | |
739 newargs[0] = " notice "; /* The spaces are magic, leave 'em in! */ | |
740 newargs[1] = args[1]; | |
741 irc_msg_privmsg(irc, name, from, newargs); | |
742 } | |
743 | |
6718 | 744 void irc_msg_nochangenick(struct irc_conn *irc, const char *name, const char *from, char **args) |
745 { | |
746 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
747 char *msg; | |
748 | |
6753 | 749 if (!args || !args[2] || !gc) |
6718 | 750 return; |
751 | |
6753 | 752 msg = g_strdup_printf(_("Could not change nick")); |
6718 | 753 gaim_notify_error(gc, _("Cannot change nick"), msg, args[2]); |
754 g_free(msg); | |
755 } | |
756 | |
6333 | 757 void irc_msg_part(struct irc_conn *irc, const char *name, const char *from, char **args) |
758 { | |
759 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
760 GaimConversation *convo; | |
761 char *nick, *msg; | |
762 | |
8186 | 763 if (!args || !args[0] || !gc) |
6333 | 764 return; |
765 | |
766 convo = gaim_find_conversation_with_account(args[0], irc->account); | |
767 if (!convo) { | |
768 gaim_debug(GAIM_DEBUG_INFO, "irc", "Got a PART on %s, which doesn't exist -- probably closed\n", args[0]); | |
769 return; | |
770 } | |
771 | |
772 nick = irc_mask_nick(from); | |
773 if (!gaim_utf8_strcasecmp(nick, gaim_connection_get_display_name(gc))) { | |
8186 | 774 msg = g_strdup_printf(_("You have parted the channel%s%s"), |
775 (args[1] && *args[1]) ? ": " : "", args[1]); | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
776 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], msg, GAIM_MESSAGE_SYSTEM, time(NULL)); |
6333 | 777 g_free(msg); |
8256
1d86096ae0f4
[gaim-migrate @ 8979]
Christian Hammond <chipx86@chipx86.com>
parents:
8186
diff
changeset
|
778 serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo))); |
6333 | 779 } else { |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
780 gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), nick, args[1]); |
6333 | 781 } |
782 g_free(nick); | |
783 } | |
784 | |
785 void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args) | |
786 { | |
787 char *buf; | |
788 if (!args || !args[0]) | |
789 return; | |
790 | |
791 buf = irc_format(irc, "v:", "PONG", args[0]); | |
792 irc_send(irc, buf); | |
793 g_free(buf); | |
794 } | |
795 | |
796 void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args) | |
797 { | |
798 GaimConversation *convo; | |
799 GaimConnection *gc; | |
800 char **parts, *msg; | |
801 time_t oldstamp; | |
802 | |
803 if (!args || !args[1]) | |
804 return; | |
805 | |
806 parts = g_strsplit(args[1], " ", 2); | |
807 | |
808 if (!parts[0] || !parts[1]) { | |
809 g_strfreev(parts); | |
810 return; | |
811 } | |
812 | |
813 if (sscanf(parts[1], "%lu", &oldstamp) != 1) { | |
814 msg = g_strdup(_("Error: invalid PONG from server")); | |
815 } else { | |
6350 | 816 msg = g_strdup_printf(_("PING reply -- Lag: %lu seconds"), time(NULL) - oldstamp); |
6333 | 817 } |
818 | |
819 convo = gaim_find_conversation_with_account(parts[0], irc->account); | |
820 g_strfreev(parts); | |
821 if (convo) { | |
822 if (gaim_conversation_get_type (convo) == GAIM_CONV_CHAT) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
823 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 824 else |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
825 gaim_conv_im_write(GAIM_CONV_IM(convo), "PONG", msg, GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG, time(NULL)); |
6333 | 826 } else { |
827 gc = gaim_account_get_connection(irc->account); | |
828 if (!gc) { | |
829 g_free(msg); | |
830 return; | |
831 } | |
832 gaim_notify_info(gc, NULL, "PONG", msg); | |
833 } | |
834 g_free(msg); | |
835 } | |
836 | |
837 void irc_msg_privmsg(struct irc_conn *irc, const char *name, const char *from, char **args) | |
838 { | |
839 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
840 GaimConversation *convo; | |
841 char *nick = irc_mask_nick(from), *tmp, *msg; | |
842 int notice = 0; | |
843 | |
844 if (!args || !args[0] || !args[1] || !gc) { | |
845 g_free(nick); | |
846 return; | |
847 } | |
848 | |
849 notice = !strcmp(args[0], " notice "); | |
850 tmp = irc_parse_ctcp(irc, nick, args[0], args[1], notice); | |
851 if (!tmp) { | |
852 g_free(nick); | |
853 return; | |
854 } | |
8163 | 855 |
856 msg = gaim_escape_html(tmp); | |
6333 | 857 g_free(tmp); |
8163 | 858 |
859 tmp = irc_mirc2html(msg); | |
860 g_free(msg); | |
861 msg = tmp; | |
6333 | 862 if (notice) { |
863 tmp = g_strdup_printf("(notice) %s", msg); | |
864 g_free(msg); | |
865 msg = tmp; | |
866 } | |
867 | |
868 if (!gaim_utf8_strcasecmp(args[0], gaim_connection_get_display_name(gc))) { | |
6982 | 869 serv_got_im(gc, nick, msg, 0, time(NULL)); |
6333 | 870 } else if (notice) { |
6982 | 871 serv_got_im(gc, nick, msg, 0, time(NULL)); |
6333 | 872 } else { |
873 convo = gaim_find_conversation_with_account(args[0], irc->account); | |
874 if (convo) | |
7118
bf630f7dfdcd
[gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents:
7108
diff
changeset
|
875 serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), nick, 0, msg, time(NULL)); |
6333 | 876 else |
877 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Got a PRIVMSG on %s, which does not exist\n", args[0]); | |
878 } | |
879 g_free(msg); | |
880 g_free(nick); | |
881 } | |
882 | |
6714 | 883 void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args) |
884 { | |
885 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
886 char *msg; | |
887 | |
888 if (!args || !args[1] || !args[2] || !gc) | |
889 return; | |
890 | |
891 msg = g_strdup_printf(_("Cannot join %s:"), args[1]); | |
892 gaim_notify_error(gc, _("Cannot join channel"), msg, args[2]); | |
893 g_free(msg); | |
894 } | |
895 | |
6333 | 896 void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args) |
897 { | |
898 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
9238 | 899 struct irc_buddy *ib; |
6333 | 900 char *data[2]; |
901 | |
902 if (!args || !args[0] || !gc) | |
903 return; | |
904 | |
905 data[0] = irc_mask_nick(from); | |
906 data[1] = args[0]; | |
907 /* XXX this should have an API, I shouldn't grab this directly */ | |
908 g_slist_foreach(gc->buddy_chats, (GFunc)irc_chat_remove_buddy, data); | |
9238 | 909 |
910 if ((ib = g_hash_table_lookup(irc->buddies, data[0])) != NULL) { | |
911 ib->flag = FALSE; | |
912 irc_buddy_status(data[0], ib, irc); | |
913 } | |
6333 | 914 g_free(data[0]); |
915 | |
916 return; | |
917 } | |
918 | |
919 void irc_msg_wallops(struct irc_conn *irc, const char *name, const char *from, char **args) | |
920 { | |
921 GaimConnection *gc = gaim_account_get_connection(irc->account); | |
8965 | 922 char *nick, *msg, *wallop; |
6333 | 923 |
924 if (!args || !args[0] || !gc) | |
925 return; | |
926 | |
927 nick = irc_mask_nick(from); | |
928 msg = g_strdup_printf (_("Wallops from %s"), nick); | |
929 g_free(nick); | |
8965 | 930 wallop = g_markup_escape_text(args[0], strlen(args[0])); |
931 gaim_notify_info(gc, NULL, msg, wallop); | |
6333 | 932 g_free(msg); |
8965 | 933 g_free(wallop); |
6333 | 934 } |
935 | |
936 void irc_msg_ignore(struct irc_conn *irc, const char *name, const char *from, char **args) | |
937 { | |
938 return; | |
939 } |