Thread View: alt.irc.ircii
5 messages
5 total messages
Started by Vegard Engen
Wed, 30 Sep 1992 14:10
user@host on incoming messages.
Author: Vegard Engen
Date: Wed, 30 Sep 1992 14:10
Date: Wed, 30 Sep 1992 14:10
132 lines
5652 bytes
5652 bytes
Thanks to AnneMarit, who requested this, I'm here releasing a patch
and a script that makes your ircII-client show the user@host on the
FIRST incoming /msg for every nick. It checks if the user@host is
changed, and displays it again if so. This works on ircII 2.2pre7,
haven't tested for others.
Please note that this may or may not be compatible with future versions
of ircII. Also note that I am NOT generally coding ircII, just when _I_
find something I think could be useful, or when I find a bug that _I_
need to fix :)) Well, here it is, use it at your own risk. It works for
me, but I can't guarantee it will work for anyone else. The rest of this
article should be saved into two different files, parse.c.diff and userhost.
I don't have the capacity to explain how to apply a patch, ask your local
ircII or Unix guru :))
---- cut here - this, and up to the next "cut here", is parse.c.diff ----
*** parse.c.old Mon Sep 21 17:04:22 1992
--- parse.c.new Mon Sep 21 17:03:29 1992
***************
*** 449,459 ****
no_flood = check_flooding(from, flood_type,ptr);
switch (list_type) {
case PUBLIC_MSG_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s", from, to, ptr))
put_it("%s(%s/%s)%s %s", high, from, to, high, ptr);
break;
case MSG_GROUP_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s", from, to, ptr))
put_it("%s-%s:%s-%s %s", high, from, to, high, ptr);
break;
case MSG_LIST:
--- 449,459 ----
no_flood = check_flooding(from, flood_type,ptr);
switch (list_type) {
case PUBLIC_MSG_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s %s", from, FromUserHost, to, ptr))
put_it("%s(%s/%s)%s %s", high, from, to, high, ptr);
break;
case MSG_GROUP_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s %s", from, FromUserHost, to, ptr))
put_it("%s-%s:%s-%s %s", high, from, to, high, ptr);
break;
case MSG_LIST:
***************
*** 469,489 ****
t = time(0);
msg = (char *) new_malloc(strlen(ptr) + 20);
sprintf(msg, "%s <%.16s>", ptr, ctime(&t));
! if (no_flood && do_hook(list_type, "%s %s", from, msg))
put_it("%s*%s*%s %s", high, from, high, msg);
new_free(&msg);
beep_em(get_int_var(BEEP_WHEN_AWAY_VAR));
} else {
! if (no_flood && do_hook(list_type, "%s %s", from, ptr))
put_it("%s*%s*%s %s", high, from, high, ptr);
}
break;
case PUBLIC_LIST:
! if (no_flood && do_hook(list_type, "%s %s", from, ptr))
put_it("%s<%s>%s %s", high, from, high, ptr);
break;
case PUBLIC_OTHER_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s", from, to, ptr))
put_it("%s<%s:%s>%s %s", high, from, to, high, ptr);
break;
}
--- 469,489 ----
t = time(0);
msg = (char *) new_malloc(strlen(ptr) + 20);
sprintf(msg, "%s <%.16s>", ptr, ctime(&t));
! if (no_flood && do_hook(list_type, "%s %s %s", from, FromUserHost, msg))
put_it("%s*%s*%s %s", high, from, high, msg);
new_free(&msg);
beep_em(get_int_var(BEEP_WHEN_AWAY_VAR));
} else {
! if (no_flood && do_hook(list_type, "%s %s %s", from, FromUserHost, ptr))
put_it("%s*%s*%s %s", high, from, high, ptr);
}
break;
case PUBLIC_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s", from, FromUserHost, ptr))
put_it("%s<%s>%s %s", high, from, high, ptr);
break;
case PUBLIC_OTHER_LIST:
! if (no_flood && do_hook(list_type, "%s %s %s %s", from, FromUserHost, to, ptr))
put_it("%s<%s:%s>%s %s", high, from, to, high, ptr);
break;
}
***************
*** 531,540 ****
log_type = set_lastlog_msg_level(LOG_PUBLIC);
no_flooding = check_flooding(from, PUBLIC_FLOOD,text);
if (is_current_channel(channel, 0)) {
! if (no_flooding && do_hook(PUBLIC_LIST, "%s %s", from, text))
put_it("%s<%s>%s %s", high, from, high, text);
} else {
! if (no_flooding && do_hook(PUBLIC_OTHER_LIST, "%s %s %s", from, channel, text))
put_it("%s<%s:%s>%s %s", high, from, channel, high, text);
}
if (beep_on_level & LOG_PUBLIC)
--- 531,540 ----
log_type = set_lastlog_msg_level(LOG_PUBLIC);
no_flooding = check_flooding(from, PUBLIC_FLOOD,text);
if (is_current_channel(channel, 0)) {
! if (no_flooding && do_hook(PUBLIC_LIST, "%s %s %s", from, FromUserHost, text))
put_it("%s<%s>%s %s", high, from, high, text);
} else {
! if (no_flooding && do_hook(PUBLIC_OTHER_LIST, "%s %s %s %s", from, FromUserHost, channel, text))
put_it("%s<%s:%s>%s %s", high, from, channel, high, text);
}
if (beep_on_level & LOG_PUBLIC)
-------- cut here - the rest of the article is the script --------
# UserHost v1.0
# Author: Vegard Engen (Veggen) (vegard@bih.no)
# Date: 30.09.92
@ UsrHost = 0
alias ShowUserHost {
@ UsrHost = MATCH($1 $($(${0}).UsrHost))
^if ( UsrHost )
{ echo *$0* $2- }
{ assign $(${0}).UsrHost $1
echo *$0\($1\)* $2- }
}
on #^msg 2 * {
ShowUserHost $0-
}
on ^msg * comment
Re: user@host on incoming messages.
Author: Robey Pointer
Date: Wed, 30 Sep 1992 15:36
Date: Wed, 30 Sep 1992 15:36
12 lines
815 bytes
815 bytes
Um... I don't want to sound rude or anything but... There is an ircII script variable, $USERHOST, I believe, that holds the user/host value of the last msg/public. If you used that, you wouldn't have to change the source at all (a definite plus) and the script would probably even be a bit smaller. Robey -- Robey Pointer | "...and that's the way Jesus pays his bills." rpointe@hubcap.clemson.edu | -Rev. Robert Tilton
Re: user@host on incoming messages.
Author: Tim Placek
Date: Wed, 30 Sep 1992 21:46
Date: Wed, 30 Sep 1992 21:46
16 lines
1445 bytes
1445 bytes
In article 1929@alf.uib.no, vegard@hp825.bih.no (Vegard Engen) writes: >Thanks to AnneMarit, who requested this, I'm here releasing a patch >and a script that makes your ircII-client show the user@host on the >FIRST incoming /msg for every nick. It checks if the user@host is >changed, and displays it again if so. This works on ircII 2.2pre7, >haven't tested for others. Hmmmm ... I have been wondering for some time if there is a way to watch the logons to irc ... is this an attempt to provide something of that sort ?? Is there an easier way to snoop for logons ?? Is that why there is no notify with wildcards ?? And REALLY ... is anyone allowed to post serious questions to this group ?? Oh yes ... you are loud and clear at AUBURN UNIVERSITY in Auburn Alabama .. BO KNOWS !!! :-)) Tim
Re: user@host on incoming messages.
Author: Michael Bohl
Date: Wed, 30 Sep 1992 23:50
Date: Wed, 30 Sep 1992 23:50
6 lines
824 bytes
824 bytes
The University of North Carolina-Chapel Hill is watching.
--
The opinions expressed are not necessarily those of the University of
North Carolina at Chapel Hill, the Campus Office for Information
Technology, or the Experimental Bulletin Board Service.
internet: bbs.oit.unc.edu or 152.2.22.80
Re: user@host on incoming messages.
Author: -=Runaway Daemon=-
Date: Fri, 02 Oct 1992 05:10
Date: Fri, 02 Oct 1992 05:10
61 lines
3559 bytes
3559 bytes
In article <1992Sep30.141042.1929@alf.uib.no> vegard@hp825.bih.no (Vegard Engen) writes:
>Thanks to AnneMarit, who requested this, I'm here releasing a patch
>and a script that makes your ircII-client show the user@host on the
>FIRST incoming /msg for every nick. It checks if the user@host is
>changed, and displays it again if so. This works on ircII 2.2pre7,
>haven't tested for others.
Figures.. Let's take the most powerful ircII client ever made and add something
that you'll have to selectively ignore. I know that your intentions are
good but this patch is TOTALLY unecessary. I could have written a script
back at ircII2.1.5 to do what your patch does. With ircII2.2pre7 is just
gets easier and easier. Lemme how you'd go about it. I'll do it
in ircII2.2pre7 code.. I'm not about to muck up my client with the patch
so I can't see exactly what your format is, but try something like this.
^on ^msg * if (rmatch($0:$userhost() $msg.list))
{
echo *$0* $1-
}
{
@ msg.list = msg.list ## [ $0:$userhost()]
echo *$0\($userhost()\)* $1-
}
Yep that's it.. I didn't look at the format of your output, but of course
with this 1 single line above (it is really one line) you can make it output
however you want.. when and where you want.. etc..
BTW.. for those that wonder, it actually looks like this when loaded.
*** On MSG from "* *" do if (rmatch($0:$userhost() $msg.list)) {echo *$0* $1-}
{@ msg.list = msg.list ## [ $0:$userhost()];echo *$0\($userhost()\)* $1-}
[SILENT] <0>
This idea will work all the way back to ircII2.2pre1 with a few exceptions
where some things were broken.... BTw.. all the paren syntax is unique to the
clients ircII2.2pre6 and beyond.
It's taken me longer to write the text of this message than it did that
script. I've got a hint for all you people aspiring to write cool features
into ircII. READ THE HELP FILES!!
The help files for ircII2.1.5 are included in the package.
The help files for ircII2.2pre7 are on major irc ftp sites.. for instance
try csd.bu.edu in /irc/clients/ircII2.2help.beta2.tar.Z
Everything you need to know is in there. How do I know this? I've read
every single help file. I updated the help files from 2.1.5 to 2.2
and continue to maintain them. It's amazing to me that someone could
find it easier to write a patch to the client that won't work in a version
or two instead of an infinately malleable script which can be updated
easily for every version to come.
BTW, looking at the script that was included with the original patch
I'm not sure if it wipes out the old userhost when it's changed to the
new one (too late at night) but I suspect that with a little descrease in
performance I make it do that too if so desired. In fact, I know I could
do it. Think about how one might remove a specific name from a flat
list. I do it all the time in my tabscript. BTW Veggen did you
notice that certain nicknames will break your script every time? It's what
happens. Do you know why?
ian
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads