|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
Hi,
I was wondering, is there anyone who can make me a common channel checker when I whois someone, or when someone starts a query with me?
Thanks in advance !
I'm looking forward to it.
- rapattack
Obey
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
try this in remotes: (ALT + R)
on *:TEXT:*:?: {
if (%pm. [ $+ [ $nick ] ] == $null) {
set -u900 %pm. [ $+ [ $nick ] ] PM $Nick
whois $nick
}
}
*untested*
-Kurdish_Assass1n
|
|
|
|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
Sorry, but that doesn't work. Not in private, and even not in /whois
Obey
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
on *:TEXT:*:?: {
if (%pm. [ $+ [ $nick ] ] == $null) {
whois $nick
set -u900 %pm. [ $+ [ $nick ] ] PM $Nick
}
}
try this, sorry, I haven't tested it either, and, make sure you put it in a new remote file: ALT + R -> FIle -> New. *still untested*
-Kurdish_Assass1n
|
|
|
|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
That still doesn't do anything. This is this is the result: [Thursday |20| 19:48:38] <HeRCuL> ja - HeRCuL is buelens@trust.x-plose.be * piep HeRCuL on +#game +#Funfactory @#pinguin +#cowboy +#brugesboy @#zonneke +#sk8tersaar +#candyshop +#darling @#zeeuwsebabbelchat @#uno @#deugniet HeRCuL is authed as hercul HeRCuL using chat.be.krey.net Live your life and do stuff.. HeRCuL has been idle 0secs, signed on Thu Jul 13 23:53:38 HeRCuL End of WHOIS list.
Obey
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
......isn't that what you wanted, when someone PM's you, you whois them automatically, right?
-Kurdish_Assass1n
|
|
|
|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
Yeah, but that was already the case. It's a mIRC standard option I think. But I ment this: I want a common channel checker, so when someone PMs me, it says in a line in the whois: HeRCuL is buelens@trust.x-plose.be * piep HeRCuL on +#game +#Funfactory @#pinguin +#cowboy +#brugesboy @#zonneke +#sk8tersaar +#candyshop +#darling @#zeeuwsebabbelchat @#uno @#deugniet HeRCuL is authed as hercul Common channels: #pinguin HeRCuL using chat.be.krey.net Live your life and do stuff.. HeRCuL has been idle 26secs, signed on Thu Jul 13 23:53:38 HeRCuL End of WHOIS list So, do you now understand me better? :tongue: Common channels: #pinguin
Last edited by RaPaTTaCK; 20/07/06 05:56 PM.
Obey
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I'm so sorry Rapattack, I'm not understanding what you're asking for, and, yea, didn't see the "whois on query", but, can you please try and be more specific?
-Kurdish_Assass1n
|
|
|
|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
OK, I'll do my best. So: You and I are each on 5 channels. I am on these channels: #woot, #house, #tv, #door and #chair You are on these: #door, #chair, #tv, #alpha, and #beta I do a whois on you: /whois -> Kurdish_Assass1n And in the whois there should be a line, saying this: Common channels with Kurdish_Assass1n: #door #chair #tv So, it checks on which channels we both are on. Is this a better explanation?
Obey
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
I don't do a lot with raws, but I think this is what you're after:
raw 319:*: {
var %nick = $2, %c = 1
while ($gettok($3-,%c,32)) {
var %chan = $v1
.echo -q $regex(%chan,/^.*(\x23.*)$/)
var %clist = $addtok(%clist,$regml(1),44)
/inc %c
}
var %c = $comchan(%nick,0)
while (%c > 0) {
if ($istok(%clist,$comchan(%nick,%c),44)) var %common = $addtok(%common,$comchan(%nick,%c),44)
/dec %c
}
if ($window(%nick)) /echo %nick %nick Common Channels: %common
else /echo -a %nick Common Channels: %common
}
Tested it, and works on 6.16
-KingTomato
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
on *:TEXT:*:?: {
if (%pm. [ $+ [ $nick ] ] == $null) {
set -u900 %pm. [ $+ [ $nick ] ] PM $Nick
com.chan $nick
}
}
alias com.chan {
echo $nick Common Channels with $1:
%i = 0
%num.of.chans = $comchan($1,0)
while (%i <= %num.of.chans) {
inc %i
if (%i == %num.of.chans) {
halt
}
echo $nick $comchan($1,%i)
}
}
I came up with this.. just do /com.chan nick or wait for a PM.. *tested and works*
Last edited by Kurdish_Assass1n; 20/07/06 06:42 PM.
|
|
|
|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
Thanks guys, I'm testing both of your scripts.
For the second scripts:
/com.chan doesn't work, and the second time I get this error: Common Channels with HeRCuL: * /echo: insufficient parameters (line 31, script6.ini)
Obey
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
I tested it and it worked, are you using both scripts? if so, ( I don't know why you would) then make sure they are both in different remote files. I'll test the script again, and see what's going on.
-Kurdish_Assass1n
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, /com.chan won't work, because it's supposed to echo in the query, but, when you use it as an alias, there is no query, so, you can use this.
on *:TEXT:*:?: {
if (%pm. [ $+ [ $nick ] ] == $null) {
set -u[color:red]900[/color] %pm. [ $+ [ $nick ] ] PM $Nick
com.chan $nick
}
}
alias -l com.chan {
echo $nick Common Channels with $1:
%i = 0
%num.of.chans = $comchan($1,0)
while (%i <= %num.of.chans) {
inc %i
if (%i == %num.of.chans) {
halt
}
echo $nick $comchan($1,%i)
}
}
alias com.chans {
echo -a Common Channels with $1:
%a = 0
%num.of.chan = $comchan($1,0)
while (%a <= %num.of.chan) {
inc %a
if (%a == %num.of.chan) {
halt
}
echo -a $comchan($1,%a)
}
}
/com.chans nick and the red part of the script is how many seconds you want it to activate again, example: if someone were to PM you, it would wait 900 seconds before it happens again.
Last edited by Kurdish_Assass1n; 20/07/06 07:52 PM.
-Kurdish_Assass1n
|
|
|
|
Joined: Jan 2006
Posts: 20
Ameglian cow
|
OP
Ameglian cow
Joined: Jan 2006
Posts: 20 |
I don't get the time part. Would you mind explaining it a bit more?
Obey
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
ok, basically, it will say "Common Channels with Nick:" "channel names." then, it won't do anything after they say something, it will wait 900 seconds before it will say it again. basically, it will unset the variable in 900 seconds, and, if they say something, it will set it again..quote from the help file. /set [-snzeuN] <%var> [value]
This sets the value of %var to the specified value.
If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.
-Kurdish_Assass1n
|
|
|
|
Joined: Jul 2006
Posts: 107
Vogon poet
|
Vogon poet
Joined: Jul 2006
Posts: 107 |
It's not nearly that complicated. /help $comchan since raw 318 is ENDOFWHOIS, I think this should work.
raw 318:*: {
var %pmnic = $2, %a = 1, %b = $comchan($2,0), %chans
while ( %a <= %b ) {
%chans = %chans $comchan(%pmnic,%a)
inc %a
}
if (!%chans) echo -ca whois No Common Channels
else echo -ca whois Common Channels with %pmnic are %chans
}
These are all local variables, so they will 'disappear' once the result is echoed. I'm not really sure that the var %pmnic needs to be set at all, but thought it might prevent problems if several whois calls should be generated very quickly. This should probably be adjusted if you are on multiple servers. I don't do multiple servers, so I haven't bothered to learn. /help multi-server Hope this helps
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I know you've gotten a lot of replies and options to try for your request, but I thought I'd give you what I came up with for you to take into consideration. on *:open:?:*:{
comchan $nick
}
alias common {
var %a = 1, %b = $comchan($1,0)
while %a <= %b {
var %chan = $addtok(%chan,$comchan($1,%a),32)
inc %a
}
$iif(!$isid,echo -a,return) $nick has the following channels common with you: $replace(%chan,$chr(32),$+($chr(44),$chr(32)))
}
raw *:*:{
if $istok(301 310 311 312 313 317 319,$numeric,32) {
var %nick = $2
}
}
raw 318:*:{
comchan %nick
}
|
|
|
|
Joined: Feb 2006
Posts: 164
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 164 |
on *:OPEN:?:*:{
var %q.cc = $comchan($nick,0), %q.c,%q.l = 1
echo $nick 10,11 $+ $str($chr(160),5) $+ 02Now chatting with14: $nick
echo $nick 10,11 $+ $str($chr(160),5) $+ 02•—— 02Stats14: query 02——•
echo $nick 10,11 $+ $str($chr(160),5) $+ $str($chr(160),4) 02With14: 14[10 $+ $nick $+ $iif($ial($nick).addr != $null,$chr(32) $+ $v1,[mask not in ial]) $+ 14]
while (%q.l <= %q.cc) { %q.c = %q.c $comchan($nick,%q.l) $+ $iif(%q.l != %q.cc,$chr(44)) | inc %q.l }
echo $nick 10,11 $+ $str($chr(160),5) $+ $str($chr(160),3) 02Chans14:10 %q.cc 14common channel $+ $iif(%q.cc != 1,s) with10 $nick $+ $+ $iif(%q.cc > 0,$chr(44) which $iif(%q.cc > 1,are,is) $+ 10 %q.c)
}
that's what i use o_O obviously if people are chatting it''ll show the ip or dns, or you may just have to do /who
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
alias common {
var %a = 1, %b = $comchan($1,0)
while %a <= %b {
var %chan = $addtok(%chan,$comchan($1,%a),32)
inc %a
}
$iif(!$isid,echo -a,return) [color:blue]$nick[/color] has the following channels common with you: $replace(%chan,$chr(32),$+($chr(44),$chr(32)))
}
raw *:*:{
if $istok(301 310 311 312 313 317 319,$numeric,32) {
var [color:blue]%nick[/color] = $2
}
}
How far did you expect to get with the $nick and %nick? You know something that I don't?
-KingTomato
|
|
|
|
|