|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
is this possible using /ison, whois etc...
on connect, ison nick, if nick is on (/ison) serv then /whois, show his [email]nick@host.domain[/email] ?
this dumb post is added coz i know that /ison has only 2 states YES and NO, and dunno how to make (if nick ison serv then do this and that)...
is this even possible ???????????????
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
just do the /ison on the server your checking if there on
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
i do and it reports NICK is online or is not online, but i want it to check/show his info IF he is online
like:
/ison nick if nick is online /who nick /echo his [email]nick@host.domain[/email]
Last edited by bunar; 14/02/04 10:39 PM.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
/ison blah replied to me with a
RAW 303 MYNICK BLAH ison: BLAH
and /ison BLAH1 replied to me with a
RAR 303 MYNICK ison: no such user
So i guess you hook the raw 303 event and whois the person ($$2)
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
sub-question on this:
at me:
raw 303:*:{ if ($var(%ison)) { if ($2) var %reply = online, %nicks = $2- else var %reply = offline, %nicks = %ison thmecho $replace(%nicks, $chr(32),$chr(44) $+ $chr(32)) $& $iif(* * iswm %nicks,are,is) %reply unset %ison halt } }
(this was made by Cold all rights to him)
so i dont want to change anything with this nice code by HOOKING to raw 303 for my 1st question, is it possible and how, and if yes, how can i do it so my script in 1st case (for searching with ison and who) dont show NICK is online... (but only in this case!!! - so when i do normal /ison it works normal) ??
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
alt-r click remotes TAB click file click new type in the following...
raw 303:*:whois303 $2-
alias whois303 {
whois $$1
.timer 0 1 whois303 $$2-
}
click ok that should whois anyone that was online from a /ison
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
good, you understund me... but 1 thing sux..
now when i ALWAYS press /ison it will execute whois, but i wanted it to do only on this special event
like /check
but when i do normal /ison it dont do /whois...
if you understand me
so itz like this:
if i do /check it should do what you made, BUT if i do just /ison it just do ison, not /whois with it...
possible?
Last edited by bunar; 15/02/04 02:05 AM.
|
|
|
|
Joined: Dec 2002
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 332 |
not sure if this is what you want ?
RAW 303:*: {
if ( $2 ) { whois $2 | halt }
}
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
alias check {
ison $$1-
set -u10 %check.ison.flag $true
}
raw 303:*:{
if (%check.ison.flag == $true) {
unset %check.ison.flag
whois303 $$2-
}
}
alias whois303 {
whois $$1
.timer 1 1 whois303 $$2-
}
I made a mistake on the timer before should be 1 1 (as above) not 0 1 (thanks Iori for the point out, else i would have copied it here without looking)
|
|
|
|
Joined: Jan 2003
Posts: 428
Fjord artisan
|
Fjord artisan
Joined: Jan 2003
Posts: 428 |
If you have a large number of people to check for, and you then run an on:Connect to run a whois if the nick is online... you may end up flooding yourself off. You could intercept the /notify reply instead. Have notify check on join. I don't see it mentioned much, but on some networks (like DALnet), you can actually get the user's host from the /notify reply - meaning you don't need to use /ison or /whois at all PastMaster
IRCnet & DALnet @#travelersinn :-: IRC for fun and relaxation :-:
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
good, dave C i thank you, it solved my question.
thank you !
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
to pastmaster:
no, i want a check QuakeNet Services (mainly Q and L) during netsplit someone could take their nicknames and i could auth to fake lamer
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
yet another sub-question on this (coz i am retarded) alias check { ison Q set -u10 %check.ison.flag $true } raw 303:*:{ if (%check.ison.flag == $true) { unset %check.ison.flag who303 Q } } alias who303 { who Q .timer 1 1 who303 Q if (Cserve isin $4) { .echo -s real Q is online } } -> now tell me ... this code checks who on Q bot and itz full info is this: TheQBot@CServe.quakenet.org now i gave if (CServe isin $4) for searching CServe word in CServe.quakenet.org, but it dont work (and this is only way to see if this is valid network bot) can anyone tell me how to fix this?
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Try this instead, it's a lot simpler IMHO alias Qcheck { inc -u5 %qcheck | userip Q }
raw 340:*:{
if %qcheck {
if Q*TheQBot@127.0.0.1 iswm $2 { echo -site * The real Q is online | halt }
elseif !$2 { echo -site * Q is not online }
else { echo -site * Fake Q online $+([,$2,]) }
}
}
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
wow, it is much simplier ! thanx much, 1 crap happens tho...
after echoing real Q is online i get this echo:
(20:58) Q*=+TheQBot@127.0.0.1
how to remove it?
and can you pls explain what does this line do: if Q*TheQBot@127.0.0.1 iswm $2
if you call userip then why itz 127.0.0.1 and all that?
Last edited by bunar; 15/02/04 08:04 PM.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
I think that is a script echo from a different script. It wouldn't be timestamped if it wasn't scripted, and also my raw 304 event is halted. and can you pls explain what does this line do: if Q*TheQBot@127.0.0.1 iswm $2That means if "Q*TheQBot@127.0.0.1" is a wildcard match for whatever $2 is in the 340 reply. if you call userip then why itz 127.0.0.1The ip is set to 127.0.0.1 so that it cannot be "nuked", if you tried, you would be nuking yourself. Edit: Re-readi9ng it I noticed I had only halted if Q was really Q. alias Qcheck { inc -u5 %qcheck | userip Q }
raw 340:*:{
if %qcheck {
if Q*TheQBot@127.0.0.1 iswm $2 { echo -site * The real Q is online }
elseif !$2 { echo -site * Q is not online }
else { echo -site * Fake Q online $+([,$2,]) }
halt
}
}
Last edited by Iori; 15/02/04 08:16 PM.
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
i looked in my script, i cant find raw340 in other than your code and while debuging i got this: :ludd.se.quakenet.org 340 mynick :Q*=+TheQBot@127.0.0.1
so it is raw 340
and for raw 304 i only found this: :304 | return Not Modified
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Uh yeah, It's 340, 304 was a typo " (20:58) Q*=+TheQBot@127.0.0.1" That timestamp isn't in what mIRC normally prints. Have you a "raw *:*:" event?
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
i got this:
raw *:* { echo $color(info2) -s $timestamps $+ $theme(logo) $2- | halt }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
LOL exactly!
Change that one to raw &*:* { echo $color(info2) -s $timestamps $+ $theme(logo) $2- | halt }
|
|
|
|
|