|
Joined: Mar 2004
Posts: 155
Vogon poet
|
OP
Vogon poet
Joined: Mar 2004
Posts: 155 |
I'm not sure if this is even possable and figured i'd ask before I even attempted to try it but is it possible to select all the nicks in the nicklist after joining a channel and saying hello to them all at once?
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
If you load this into your Nicklist Popups (Alt-R, PopUps Tab, View - Nick List). I think it'll work
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 175 |
$snick(#,0) returns the total number of selected users in the channel, not the names of the users. It's not possible to select all the nicknames. You can only select one at a time through /sline. However, you may return all the selected nicknames through the $snicks identifier. Alternatively, you can use raws to retrieve all the nicknames in the channel like so: on me:*:JOIN:#channel: { set $+(%,names.,$cid,.,#) }
raw 353:*: {
if ($var($+(%,names.,$cid,.,$3))) {
set $+(%,names.,$cid,.,$3) $($+(%,names.,$cid,.,$3),2) $right($4-,-1)
}
}
raw 366:*: {
if ($($+(%,names.,$cid,.,$2),2)) {
msg $2 Hello, $v1
unset $+(%,names.,$cid,.,$2)
}
}
- Relinsquish
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
It's not possible to select all the nicknames. You can only select one at a time through /sline.
Yes it is possible. From the help file /sline [-a|r] <#channel> <N|nick>Selects or deselects lines in a channel nickname listbox. It can select either the Nth nickname in a listbox, or a specified nickname. If you do not specify any switches, any existing selections in the listbox are cleared. If you specify the -a switch then the specified is selected without affecting the selection states of other lines. If you specify the -r switch then the specified item is deselected. Darkmnm,
alias getnicks {
if ($active ischan) {
var %x = $nick($active,0)
while (%x) {
sline -a $active %x
msg $nick($active,%x) Hello $nick($active,%x)
dec %x
}
}
}
|
|
|
|
Joined: Mar 2004
Posts: 540
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 540 |
Why make things so complicated? Say Hi: { var %tnicks = $snick(#,0) var %x = 1 while (%x <= %tnicks) { msg $active Hi $snick(#,%x) inc %x } }
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
The thing is though, they want to select the nicknames upon joining and with your code they'd need to manually select the nicknames then proceed with the command. How about something like,
on me:*:join:[color:red]#channel[/color]: {
getnicks
}
alias getnicks {
if ($active ischan) {
var %x = $nick($active,0)
while (%x) {
sline -a $active %x
msg $nick($active,%x) Hello $nick($active,%x)
dec %x
}
}
}
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
eeeeeeek you msg flooder. lol
menu nicklist {
Say hello to all selected : {
var %s = Hello to
var %n
var %m = $snick($chan,0)
var %i = 1
while (%i <= %m) {
var %n = %n $snick($chan,%i)
if ($len(%n) > 400) {
//echo say %s %n
var %s = and also
var %n
}
inc %i
}
if (%n) //echo say %s %n
}
}
This says hello to everyone selected. PS: its a bit flood as well
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
on me:*:JOIN:#: msg # Hello everyone. No flood and is aimed at every nick in the channel
Gone.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
eeeeeeek you msg flooder. lol It has been known. How about adding a timer for a short delay..
on me:*:Join:#: {
%getnicks.chan = $chan
.timerGetnicks 1 1 getnicks
}
alias getnicks {
var %x = $nick(%getnicks.chan,0)
while (%x) {
sline -a %getnicks.chan %x
.timer 1 $calc(%x + 1) .msg $nick(%getnicks.chan,%x) Hello $nick(%getnicks.chan,%x)
dec %x
}
}
|
|
|
|
Joined: Mar 2004
Posts: 540
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 540 |
I'm not sure if this is even possable and figured i'd ask before I even attempted to try it but is it possible to select all the nicks in the nicklist after joining a channel and saying hello to them all at once? The way I read that is that he is joining a channel and highlighting the list after he joins the room, so I see no fault in my code in that view point
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Yeah, we both had different ideas as to what the original poster asked for. I don't think there's anything wrong with your code and there's by far no fault either I'm sorry if it came across that way.
All the best,
Andy.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
on me:*:JOIN:#: msg # Hello everyone. No flood and is aimed at every nick in the channel Hahaha very clever!! lol.. I know this is stupid but also..
on me:*:Join:#: {
set %getnicks.chan $chan
.timer 1 1 getnicks
}
alias getnicks {
var %x = $nick(%getnicks.chan,0), %getnicks.nicks
while (%x) {
var %getnicks.nicks = $addtok(%getnicks.nicks,$nick(%getnicks.chan,%x),44)
dec %x
}
msg %getnicks.chan Hello $replace(%getnicks.nicks,$chr(44),$chr(44) $+ $chr(32)) $+ .
unset %getnicks.*
}
Just a silly suggestion.
|
|
|
|
Joined: Mar 2004
Posts: 155
Vogon poet
|
OP
Vogon poet
Joined: Mar 2004
Posts: 155 |
Thanks to everyone that's posted sollutions to my question. I'll try each one and use the one that works the best. Thanks again.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You're welcome.
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
Vogon poet
Joined: Mar 2004
Posts: 175 |
Yes it is possible.
From the help file
/sline [-a|r] <#channel> <N|nick> Selects or deselects lines in a channel nickname listbox. It can select either the Nth nickname in a listbox, or a specified nickname.
If you do not specify any switches, any existing selections in the listbox are cleared. If you specify the -a switch then the specified is selected without affecting the selection states of other lines. If you specify the -r switch then the specified item is deselected. Thanks for letting me know. I was looking in the Custom Windows section of the help file and overlooked the -a switch.
- Relinsquish
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You're welcome dude.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
On the continuing of sillyness.. You didnt select all the nicks tho? on me:*:Join:#: {
.timer 1 1 selectnicks $chan
}
alias selectnicks {
var %i = $nick($1,0) | while (%i) { sline -a $1 %i | dec %i }
msg $1 Hello $replace($snicks,$chr(44),$chr(44) $+ $chr(32)) $+ .
;^ I suspect the script to go spalt on its face at this moment when the string to long error occurs unless only a few uasers are in channel.
} My personal fav for sillyness would be do excactly what he asked for... I'm not sure if this is even possable and figured i'd ask before I even attempted to try it but is it possible to select all the nicks in the nicklist after joining a channel and saying hello to them all at once? on me:*:Join:#: {
.timer 1 1 selectnicks $chan
}
alias selectnicks {
var %i = $nick($1,0) | while (%i) { sline -a $1 %i | dec %i }
msg $1 hello to them all at once?
} What? What! Why is everyone laughng at me?
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You didnt select all the nicks tho?
I know, it was along the lines of what FiberOPtics suggested. My personal fav for sillyness would be do excactly what he asked for...
I did what he asked for too, or atleast I think I did.
on me:*:Join:#: {
%getnicks.chan = $chan
.timerGetnicks 1 1 getnicks
}
alias getnicks {
var %x = $nick(%getnicks.chan,0)
while (%x) {
sline -a %getnicks.chan %x
.timer 1 $calc(%x + 1) .msg $nick(%getnicks.chan,%x) Hello $nick(%getnicks.chan,%x)
dec %x
}
}
The only difference is that you added a silly $1 ($chan) and moved the msg between the two closing braces. We really do have a silly thread here..
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Nothing wrong with it but it would be a killer on a channel im in 1800+ users eeeeeeeek 1800+ timers. 30mins later someone gets a Hi from me lol
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Nothing wrong with a late birthday card unless there's no cash in it.
|
|
|
|
|