mIRC Home    About    Download    Register    News    Help

Print Thread
#123837 27/06/05 10:41 PM
Joined: Jun 2005
Posts: 44
B
BNX Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
Is there a way... well I know there is... but how!
To read only the nicks in the room?

for example:
<Person> !random nick
<Bot> Georgebob
<Georgebob> o.o

I have seen this done with another mirc bot, who "hugged" all the people in the room.

Last edited by BNX; 27/06/05 10:43 PM.
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
on *:TEXT:!random nick:#:msg # $nick(#,$rand(1,$nick(#,0)))

Joined: Jun 2005
Posts: 44
B
BNX Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
awesome! Thanks a bunch, that was shorter than I expected...

If I wanted to use all the members, would I do..

msg # $nick(#)

Last edited by BNX; 29/06/05 03:12 AM.
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
pretty close, /help $snicks

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
$snicks would return selected nicks, not ALL nicks. Not unless you selected all of them in the nicklist.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Your idea would flood the room if there are a lot of people in the room.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Jun 2005
Posts: 44
B
BNX Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
The server I use is very small, never anymore than 15 people in the channel. But thanks smile

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:

$snicks would return selected nicks, not ALL nicks. Not unless you selected all of them in the nicklist.


yes... Ithought /sline was with it... my bad
Quote:

/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.

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
alias allnicks {
var %i = 1, %n, %chan = $iif($1 ischan,$1,$chan)
while ($nick(%chan,%i)) {
var %n = %n $v1
inc %i
}
if ($isid) return %n
msg %chan %n
}

To just get all nicknames, use $allnicks(#channel) or $allnicks if you're in the correct window/event, to send a message to the channel with only all nicks: /allnicks #channel

You can probably adapt it somewhat to your needs...

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
For the bot try
Code:
on *:TEXT:!allnicks*:#:{
  var %i = 1
  while ($nick(#,%i)) {
    if ($nick($chan,%i) != $me) { var %allchan = %allchan $nick(#,%i) }
    inc %i
  }
  msg $chan %allchan
}

It should post all the nicks but the bots


Link Copied to Clipboard