Thread View: alt.irc.ircii
4 messages
4 total messages
Started by Jeremy F Nelson
Sat, 10 Oct 1992 06:26
Getting the user@host out of the /on join
Author: Jeremy F Nelson
Date: Sat, 10 Oct 1992 06:26
Date: Sat, 10 Oct 1992 06:26
17 lines
1028 bytes
1028 bytes
On the two clients i have used, 2.2pre5 and 2.2pre7, when someone joins a channel you are already on, it is kind enough to provide you with the user@host for that person. NOW: is there anyway to get this information? it obviously doesnt come up on /on join * It would save a bit of code, and the time needed to wait for the /whois. Thanks in advance. hop -- jnelson@iastate.edu four Do you think I really _CARE_ if my views lines are or are not those of Iowa State University? suffice. New ISU Policy: "doing anything unnice is stictly prohibited."
Re: Getting the user@host out of the /on join
Author: Doug McLaren
Date: Sat, 10 Oct 1992 16:49
Date: Sat, 10 Oct 1992 16:49
36 lines
2232 bytes
2232 bytes
In article <1992Oct10.062619.23952@news.iastate.edu> jnelson@iastate.edu (Jeremy F Nelson) writes: >On the two clients i have used, 2.2pre5 and 2.2pre7, when someone joins a >channel you are already on, it is kind enough to provide you with the >user@host for that person. > >NOW: is there anyway to get this information? it obviously doesnt come up >on /on join * It would save a bit of code, and the time needed to >wait for the /whois. Dude ... should have asked me this one ! :) What you want is $%userhost() ... after most /on commands, it's set to the user@host of the originator of the event that triggered the /on. I could go on and on about how it works, and how it's undefined after certain /on's, but I won't ... basically let me say that it IS set for most things you'd want to use it for (it ISN'T defined after a /on notify_signon, but ...) Basically, what you are probably looking for is something like this ... on -join "DemoN" /if "$%userhost()=dougmc@ccwf.cc.utexas.edu" /mode $1 +o $0 (Not that auto-ops aren't overdone ...) (This is also for pre5 and before. pre6 and pre7 the syntax is a little different ...) Let's just say $%userhost() is set by /on msg, /on join, /on mode, /on kick (if you have it), /on public, /on notice, /on ctcp etc ... NOW you know why I haven't felt the need to put some sort of /on ctcp security system into my bots ... $%userhost() is so easy to use ... DemoN -- DouG McLareN, dougmc@ccwf.cc.utexas.edu, DemoN on IRC. ObCuteQuote : $100 invested at 7% interest for 100 years will become $100,000, at which time it will be worth absolutely nothing. -- Lazarus Long, "Time Enough for Love"
Re: Getting the user@host out of the /on join
Author: -=Runaway Daemon=-
Date: Sun, 11 Oct 1992 04:11
Date: Sun, 11 Oct 1992 04:11
19 lines
1303 bytes
1303 bytes
In article <1992Oct10.164900.2123@sol.ctr.columbia.edu> dougmc@ccwf.cc.utexas.edu (Doug McLaren) writes: >In article <1992Oct10.062619.23952@news.iastate.edu> jnelson@iastate.edu (Jeremy F Nelson) writes: >Basically, what you are probably looking for is something like this ... > > on -join "DemoN" /if "$%userhost()=dougmc@ccwf.cc.utexas.edu" /mode $1 +o $0 Basically what he wants is on ^join * echo *** $0 ($%userhost()) has joined channel $1 This is compatible with the format of the 2.2pre clients. And to clarify a bit when the server sends the userhost. Just do on ^raw_irc * echo $* And watch what the server sends you. Note this will override all your other ON's. (with the exception of serial numbered ON's in pre7) ian
Re: Getting the user@host out of the /on join
Author: Doug McLaren
Date: Sun, 11 Oct 1992 17:34
Date: Sun, 11 Oct 1992 17:34
45 lines
2684 bytes
2684 bytes
In article <1992Oct11.041150.827@ucsu.Colorado.EDU> frechett@spot.Colorado.EDU (-=Runaway Daemon=-) writes: >In article <1992Oct10.164900.2123@sol.ctr.columbia.edu> dougmc@ccwf.cc.utexas.edu (Doug McLaren) writes: >>In article <1992Oct10.062619.23952@news.iastate.edu> jnelson@iastate.edu (Jeremy F Nelson) writes: >>Basically, what you are probably looking for is something like this ... >> >> on -join "DemoN" /if "$%userhost()=dougmc@ccwf.cc.utexas.edu" /mode $1 +o $0 (This is your basic auto-op based on user@host and nick. I am *not* saying that this is the best way to op -- a good op routine will not op anybody who is already opped, and if it's activated by an /on join statement, it will wait a little while, to see if this person is opped by somebody else. This is not, however, quite this simple ... perhaps in a later post ...) >Basically what he wants is > on ^join * echo *** $0 ($%userhost()) has joined channel $1 >This is compatible with the format of the 2.2pre clients. up through and including pre5 that is ... If I recall correctly, pre6 and pre7 demand $userhost() and not $%userhost(). (pre5 I think will use both ...) That is to be nitpicky ... The format of the 'if' command changed radically (for the better, I think ...) under pre6 and pre7. I just haven't gotten into the habit of coding for pre7 ... I still generally use pre5. >And to clarify a bit when the server sends the userhost. Just do > >on ^raw_irc * echo $* A learning experience in any event ... I once had something set up where it sent the generic ircII output to one window and the raw_irc stuff to another ... I forget how I did it, but it was something like ... on -raw_irc * /xecho -window raw_irc $* SOMETHING like this ... I forget the exact syntax ... (and of course the window raw_irc must already exist. And if you're going to do this, I suggest having -- DouG McLareN, dougmc@ccwf.cc.utexas.edu, DemoN on IRC. ObCuteQuote : PL/1, "the fatal disease", belongs more to the problem set than to the solution set. -- E. W. Dijkstra
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