|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
alias ctcpevery { var %loop = 1 var %tempthing = 1 while (%loop <= %killnicks) { ctcp $nick($active,%tempthing) version inc %tempthing } }
%killnicks is already set to a numerical value. I don't get any errors, just nothing happens.
oh, seperate question, too. how can I get the total number of nicks in a channel?
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
%loop is part of the condition, yet is never increased leaving me to believe u have an infinate loop...
$Nick($chan, 0) = Total nicks
-KingTomato
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
yeah, I realized that, lol.
even this...
alias killnow { var %loop = 1 var %tempthing = 1 while (%loop <= %killnicks) { ctcp $nick($active,%tempthing) version inc %tempthing inc %loop } }
doesn't work though
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
First off it appears (in a way) your looking to ctcp nicks in the channel one by one. Why not use /ctcp <chan> PING? Secondly, if it is "certain nicks" (As listed in %killnicks) that would only specify the first X nicks, not a nick-specific list.
Basically, what are you trying to achieve, and mybe i can help you better >:D
EDIT: Sorry, i meant to say /ctcp <chan> version, not ping--lil tired >:D
-KingTomato
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
I'm trying to get rid of bottlers, most of them don't seem to respond to channel pings...
I'm not sure what you mean by the second bit. I just want the script to ctcp everyone in the channel. right now I manually set the %killnicks variable to the number in the channel. I'll change that part once I get it working...
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
This will ctcp version everyone in the channel: alias killnow {
var %i = 1,%u = $nick(#,0)
while ( %i <= %u ) {
ctcp $nick(#,%i) VERSION
inc %i
}
}
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
thanks, but I guess I can only do so many ctcps at a time...
how would I seperate with a timer?
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
alias killnow { /ctcp $active VERSION }
-KingTomato
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
uh, like I said, they're mostly bottlers. so they're in +m channels, I can't send a message to the channel, but I can to individual users.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
alias killnow {
var %n = 1, %chan = $active, %delay = 2
while ($nick(%chan,%n)) {
.timer 1 $calc((%n * %delay) - %delay) /ctcp $ifmatch VERSION
inc %i
}
}
change delay as it applies
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
I haven't tested this but it looks like your checking %n but inc-ing %i.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
thats what i get for ctrl+c'n ur code, and changing something..
alias killnow {
var %n = 1, %chan = $active, %delay = 2
while ($nick(%chan,%n)) {
.timer 1 $calc((%n * %delay) - %delay) /ctcp $ifmatch VERSION
inc %n
}
}
most (including urself guess) use i for integer assuming a loop, and go on to j,k, etc. Imyself like references vars like n for nick, or c for chan, etc.
-KingTomato
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
It is my understanding that bottlers have a unique ctcp version reply... would it not be easier to create and on join that will ctcp the nick... then an on ctcpreply for version that will kick/ban whatever you wanna do if the reply matches that of the bottlers?
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
And for when u first join the channel, how do u ctcp on join?
-KingTomato
|
|
|
|
|