b1a260eb89
changes in 4.4M are: - .ircquick support (loaded when client starts) - new functions: hasvoice(), dcclist() and chatpeers() - new variable: MAKE_NOTICE_MSG - fixed long line sending in ICB mode: long lines are split and send to the server separately - new scripts based on my start up: default (suggested for a .ircrc), times (to add time to most chat) and otherstatus (to allow non-inverse status lines to be constructed) - fix by in xecho - make SHOW_CHANNEL_NAMES work in ICB mode. - incorporate IPv6 support additional fixes include: - ipv6 support in configure.in was a bit broken - /whois works in ICB mode - group name changes are now handled in ICB mode
81 lines
2.4 KiB
Text
81 lines
2.4 KiB
Text
$NetBSD: patch-ad,v 1.3 2000/01/31 23:00:48 mrg Exp $
|
|
|
|
Index: source/icb.c
|
|
===================================================================
|
|
RCS file: /home/cvs/ircii/source/icb.c,v
|
|
retrieving revision 2.24
|
|
retrieving revision 2.26
|
|
diff -p -u -r2.24 -r2.26
|
|
--- source/icb.c 2000/01/06 01:00:55 2.24
|
|
+++ source/icb.c 2000/01/31 22:29:07 2.26
|
|
@@ -216,7 +216,7 @@ icb_got_status(line)
|
|
group = ap[1] + 21;
|
|
KILL_SPACE(group);
|
|
clear_channel_list(parsing_server_index);
|
|
- add_channel(group, parsing_server_index, 1, 0);
|
|
+ add_channel(group, parsing_server_index, CHAN_JOINED, 0);
|
|
set_server_icbgroup(parsing_server_index, group);
|
|
icb_set_fromuserhost(empty_string);
|
|
message_from(group, LOG_CRAP);
|
|
@@ -268,14 +268,32 @@ icb_got_status(line)
|
|
do_say = 0;
|
|
RESTORE_SPACE;
|
|
}
|
|
+ else
|
|
+ if (my_stricmp(ap[0], "change") == 0)
|
|
+ {
|
|
+ /* look for "Group is now named XXX" */
|
|
+
|
|
+ if (my_strnicmp(ap[1], "Group is now named ", 19) == 0)
|
|
+ {
|
|
+ int len;
|
|
+
|
|
+ group = ap[1] + 19;
|
|
+ len = strlen(group);
|
|
+ if (group[len - 1] == '.')
|
|
+ group[len - 1] = 0; /* kill the period */
|
|
+
|
|
+ clear_channel_list(parsing_server_index);
|
|
+ add_channel(group, parsing_server_index, CHAN_JOINED, 0);
|
|
+ set_server_icbgroup(parsing_server_index, group);
|
|
+ icb_set_fromuserhost(empty_string);
|
|
+ }
|
|
+ /* leave do_say set for both cases */
|
|
+ }
|
|
|
|
- /* run this hook even if do_say is no? for now, no. */
|
|
- /* HOOK: new? status? icb_status? */
|
|
- /* the hook is needed. or support here for it. there are a lot more status messages
|
|
- * we need to deal with that come via here... */
|
|
#if 0
|
|
-*** info Change: Group is now named somaz
|
|
+/* messages not yet understood */
|
|
#endif
|
|
+
|
|
if (do_say && do_hook(ICB_STATUS_LIST, "%s %s", ap[0], ap[1]))
|
|
say("info %s: %s", ap[0], ap[1]);
|
|
out:
|
|
@@ -623,13 +641,16 @@ icb_put_msg2(to, line)
|
|
size_t len, remain;
|
|
|
|
/* HOOK: send_msg */
|
|
- save_message_from();
|
|
- level = set_lastlog_msg_level(LOG_MSG);
|
|
- message_from(to, LOG_MSG);
|
|
- if (do_hook(SEND_MSG_LIST, "%s %s", to, line))
|
|
- put_it("-> *%s* %s", to, line);
|
|
- set_lastlog_msg_level(level);
|
|
- restore_message_from();
|
|
+ if (window_display)
|
|
+ {
|
|
+ save_message_from();
|
|
+ level = set_lastlog_msg_level(LOG_MSG);
|
|
+ message_from(to, LOG_MSG);
|
|
+ if (do_hook(SEND_MSG_LIST, "%s %s", to, line))
|
|
+ put_it("-> *%s* %s", to, line);
|
|
+ set_lastlog_msg_level(level);
|
|
+ restore_message_from();
|
|
+ }
|
|
|
|
/* deal with ICB 255 length limits */
|
|
/* command + 'm' + sep + to + space + (line +) nul */
|