diff -c -r ScrollZ.orig/source/edit2.c ScrollZ/source/edit2.c *** ScrollZ.orig/source/edit2.c Fri Jul 21 18:11:27 2006 --- ScrollZ/source/edit2.c Sat Nov 18 15:09:08 2006 *************** *** 1739,1752 **** char *args; char *subargs; { char *channel; char *tmparg; ChannelList *chan; channel = get_channel_by_refnum(0); if (!(args && *args)) { if (channel && (chan = lookup_channel(channel, from_server, 0))) { ! if (chan->topicstr) say("Topic for %s: %s", chan->channel, chan->topicstr); else say("No topic is set for %s", chan->channel); if (chan->topicwho) say("%s by %s on %.19s", chan->topicstr ? "Set" : "Unset", --- 1739,1763 ---- char *args; char *subargs; { + int iscrypted; char *channel; char *tmparg; + char *x; + char *cstr = ""; + char tmpbuf[BIG_BUFFER_SIZE + 1]; ChannelList *chan; channel = get_channel_by_refnum(0); + x = tmpbuf; if (!(args && *args)) { if (channel && (chan = lookup_channel(channel, from_server, 0))) { ! if (chan->topicstr) { ! strmcpy(tmpbuf, chan->topicstr, sizeof(tmpbuf)); ! iscrypted = DecryptMessage(tmpbuf, chan->channel); ! if (iscrypted == 2) cstr = "[*]"; ! else if (iscrypted) cstr = "[!]"; ! say("Topic for %s%s: %s", cstr, chan->channel, x); ! } else say("No topic is set for %s", chan->channel); if (chan->topicwho) say("%s by %s on %.19s", chan->topicstr ? "Set" : "Unset", *************** *** 1758,1767 **** if (!is_channel(args)) { if (channel) { if ((chan = lookup_channel(channel, from_server, 0))) { if (((chan->mode) & MODE_TOPIC) && HAS_OPS(chan->status)) ! send_to_server("TOPIC %s :%s", channel, args); else if ((chan->mode) & MODE_TOPIC) NotChanOp(channel); ! else send_to_server("TOPIC %s :%s", channel, args); } } else NoWindowChannel(); --- 1769,1780 ---- if (!is_channel(args)) { if (channel) { if ((chan = lookup_channel(channel, from_server, 0))) { + strmcpy(tmpbuf, args, sizeof(tmpbuf)); + EncryptMessage(tmpbuf, channel); if (((chan->mode) & MODE_TOPIC) && HAS_OPS(chan->status)) ! send_to_server("TOPIC %s :%s", channel, tmpbuf); else if ((chan->mode) & MODE_TOPIC) NotChanOp(channel); ! else send_to_server("TOPIC %s :%s", channel, tmpbuf); } } else NoWindowChannel(); *************** *** 1769,1778 **** else { tmparg = new_next_arg(args, &args); if ((chan = lookup_channel(tmparg, from_server, 0))) { if (((chan->mode) & MODE_TOPIC) && HAS_OPS(chan->status)) ! send_to_server("TOPIC %s :%s", chan->channel, args); else if ((chan->mode) & MODE_TOPIC) NotChanOp(chan->channel); ! else send_to_server("TOPIC %s :%s", chan->channel, args); } else say("You are not on channel %s", tmparg); } --- 1782,1793 ---- else { tmparg = new_next_arg(args, &args); if ((chan = lookup_channel(tmparg, from_server, 0))) { + strmcpy(tmpbuf, args, sizeof(tmpbuf)); + EncryptMessage(tmpbuf, channel); if (((chan->mode) & MODE_TOPIC) && HAS_OPS(chan->status)) ! send_to_server("TOPIC %s :%s", chan->channel, tmpbuf); else if ((chan->mode) & MODE_TOPIC) NotChanOp(chan->channel); ! else send_to_server("TOPIC %s :%s", chan->channel, tmpbuf); } else say("You are not on channel %s", tmparg); } diff -c -r ScrollZ.orig/source/numbers.c ScrollZ/source/numbers.c *** ScrollZ.orig/source/numbers.c Sun Apr 30 16:15:43 2006 --- ScrollZ/source/numbers.c Sat Nov 18 15:13:29 2006 *************** *** 635,640 **** --- 635,643 ---- { char *topic, *channel; /**************************** Patched by Flier ******************************/ + int iscrypted; + char *cstr = ""; + char tmpbuf[BIG_BUFFER_SIZE + 1]; ChannelList *chan; topic = channel = NULL; *************** *** 647,653 **** message_from(channel, LOG_CRAP); /**************************** Patched by Flier ******************************/ /*put_it("%s Topic for %s: %s", numeric_banner(), channel,*/ ! put_it("%sTopic for %s: %s", numeric_banner(), channel, /****************************************************************************/ topic); } --- 650,661 ---- message_from(channel, LOG_CRAP); /**************************** Patched by Flier ******************************/ /*put_it("%s Topic for %s: %s", numeric_banner(), channel,*/ ! strmcpy(tmpbuf, topic, sizeof(tmpbuf)); ! iscrypted = DecryptMessage(tmpbuf, channel); ! if (iscrypted == 2) cstr = "[*]"; ! else if (iscrypted) cstr = "[!]"; ! if (iscrypted) topic = tmpbuf; ! put_it("%sTopic for %s%s: %s", numeric_banner(), cstr, channel, /****************************************************************************/ topic); } diff -c -r ScrollZ.orig/source/parse.c ScrollZ/source/parse.c *** ScrollZ.orig/source/parse.c Tue Oct 31 13:31:27 2006 --- ScrollZ/source/parse.c Sat Nov 18 15:19:45 2006 *************** *** 339,356 **** } else { message_from(ArgList[0], LOG_CRAP); ! if (do_hook(TOPIC_LIST, "%s %s %s", from, ArgList[0], ArgList[1])) /**************************** PATCHED by Flier ******************************/ /*say("%s has changed the topic on channel %s to %s", from, ArgList[0], ArgList[1]);*/ { if (*ArgList[1]) ! say("%s has set the topic on channel %s to %s", ! from, ArgList[0], ArgList[1]); else ! say("%s has unset the topic on channel %s", ! from, ArgList[0]); } /****************************************************************************/ } --- 339,365 ---- } else { + int iscrypted; + char *cstr = ""; + char tmpbuf[BIG_BUFFER_SIZE + 1]; + + strmcpy(tmpbuf, ArgList[1], sizeof(tmpbuf)); + iscrypted = DecryptMessage(tmpbuf, ArgList[0]); + if (iscrypted == 2) cstr = "[*]"; + else if (iscrypted) cstr = "[!]"; + message_from(ArgList[0], LOG_CRAP); ! if (do_hook(TOPIC_LIST, "%s %s %s", from, ArgList[0], tmpbuf)) /**************************** PATCHED by Flier ******************************/ /*say("%s has changed the topic on channel %s to %s", from, ArgList[0], ArgList[1]);*/ { if (*ArgList[1]) ! say("%s has set the topic on channel %s%s to %s", ! from, cstr, ArgList[0], tmpbuf); else ! say("%s has unset the topic on channel %s%s", ! from, cstr, ArgList[0]); } /****************************************************************************/ }