mIRC Home    About    Download    Register    News    Help

Print Thread
raw question #177813 31/05/07 07:05 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Is there any raw to check version on join?

Re: raw question [Re: Garou] #177818 31/05/07 07:27 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
on *:join:#:{
raw privmsg $nick VERSION
}


I dont think there's a numeric, at least not client side...


btk


billythekid
Re: raw question [Re: billythekid] #177820 31/05/07 07:36 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Code:
on *:JOIN:#: { if ($nick != $me) ctcp $nick VERSION }


If it ain't broken, don't fix it!
Re: raw question [Re: billythekid] #177821 31/05/07 07:41 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Is this right?

on *:join:#:{
.ctcp $nick VERSION
}
on *:CTCPREPLY:VERSION*: {
var %i = 0
while (%i < $numtok(%ctcp,32)) {
inc %i
var %ctcpreply = $gettok(%ctcp,%i,32)
if ($istok($strip($1-),%ctcpreply,32) == $true) {
VAR %c = 0
while (%c < $comchan($nick,0)) {
inc %c
if ($me isop $comchan($nick,%c)) {
ban -k $comchan($nick,%c) $nick 2 14Bad Script
}
}
}
}
}

Last edited by Garou; 31/05/07 07:58 PM.
Re: raw question [Re: Garou] #177822 31/05/07 07:49 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
no, the way you have it there without the 'codes' will just send a query (/msg nick version) easier to do as Dognach notes and send the ctcp(which is what i did anyhow, just written differently)

btk


billythekid
Re: raw question [Re: billythekid] #177824 31/05/07 08:01 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Originally Posted By: billythekid
DoQnach


and indeed, it's better to use the /ctcp command instead of crafting your own CTCP message through raw commands.


If it ain't broken, don't fix it!
Re: raw question [Re: Doqnach] #177825 31/05/07 08:10 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Ok this is working...now is there away not to check someone that been check already i mean not to version cycle bots or ip that was just in?

on *:join:#:{
ctcp $nick VERSION
}
on *:CTCPREPLY:VERSION*: {
var %i = 0
while (%i < $numtok(%ctcp,32)) {
inc %i
var %ctcpreply = $gettok(%ctcp,%i,32)
if ($istok($strip($1-),%ctcpreply,32) == $true) {
VAR %c = 0
while (%c < $comchan($nick,0)) {
inc %c
if ($me isop $comchan($nick,%c)) {
ban -k $comchan($nick,%c) $nick 2 14Bad Script
}
}
}
}
}

Re: raw question [Re: Garou] #177826 31/05/07 08:43 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
I don't have a ready made script for that but best method would be to use hash tables to track people you recently checked...


If it ain't broken, don't fix it!
Re: raw question [Re: Doqnach] #177827 31/05/07 08:52 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Ok thx if you have time please poste here thx.

Re: raw question [Re: Garou] #177836 31/05/07 11:37 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Garou, there isn't a real need to check your own version, is there? Unless you want to for some reason, you should set it to *not* check your version when you join the channel...

Code:
on !*:join:#:{
  ctcp $nick VERSION
}


That ! does what Doqnach did with the if ($nick != $me) thing; it's just a shorter method.

Also, you've been here long enough to know that you should always use the CODE tags in this forum.


Invision Support
#Invision on irc.irchighway.net
Re: raw question [Re: Riamus2] #177840 01/06/07 12:11 AM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Are these two lines here useless??
if !$($+(%,version.check,.,$fulladdress),2) {
set -e $+(%,version.check,.,$fulladdress) 1

Code:
 
on !*:join:#:{
if (%CTCPREPLY == off) || !%CTCPREPLY || ($nick isop $chan) || (%options.exempt == on) { return }
if !$($+(%,version.check,.,$fulladdress),2) {
.ctcp $nick VERSION 
set -e $+(%,version.check,.,$fulladdress) 1
}
}
on *:CTCPREPLY:VERSION*: {
var %i = 0
while (%i < $numtok(%ctcp,32)) {
inc %i
var %ctcpreply = $gettok(%ctcp,%i,32)
if ($istok($strip($1-),%ctcpreply,32) == $true) {
VAR %c = 0
while (%c < $comchan($nick,0)) { 
inc %c
if ($me isop $comchan($nick,%c)) {
ban -k $comchan($nick,%c) $nick 2 14Bad Script Detected
}
}
}
}
} 


Re: raw question [Re: Garou] #177842 01/06/07 12:34 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
No, those aren't useless. I was just saying that you should have the ! in the on join line.


Invision Support
#Invision on irc.irchighway.net
Re: raw question [Re: Riamus2] #177843 01/06/07 12:39 AM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
I know Riamus2 I already fixed that. Those two lines are supose to prevent not to version again if the address is already in the var but all it does is not show but it still version the same address again.

Re: raw question [Re: Doqnach] #177886 01/06/07 08:10 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Originally Posted By: Doqnach
Originally Posted By: billythekid
DoQnach


Many apologies, all I can guess is that I'm an idiot!

btk


billythekid