|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Is there any raw to check version on join?
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
on *:join:#:{
raw privmsg $nick VERSION
}
I dont think there's a numeric, at least not client side... btk
billythekid
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
on *:JOIN:#: { if ($nick != $me) ctcp $nick VERSION }
If it ain't broken, don't fix it!
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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.
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
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
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
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!
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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 } } } } }
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
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!
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Ok thx if you have time please poste here thx.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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...
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
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Are these two lines here useless?? if !$($+(%,version.check,.,$fulladdress),2) { set -e $+(%,version.check,.,$fulladdress) 1
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
}
}
}
}
}
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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.
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
Many apologies, all I can guess is that I'm an idiot! btk
billythekid
|
|
|
|
|