mIRC Homepage

Read from nicks in room.

Posted By: BNX

Read from nicks in room. - 27/06/05 10:41 PM

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.
Posted By: mIRCManiac

Re: Read from nicks in room. - 27/06/05 10:50 PM

on *:TEXT:!random nick:#:msg # $nick(#,$rand(1,$nick(#,0)))
Posted By: BNX

Re: Read from nicks in room. - 29/06/05 03:10 AM

awesome! Thanks a bunch, that was shorter than I expected...

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

msg # $nick(#)
Posted By: MikeChat

Re: Read from nicks in room. - 29/06/05 03:27 AM

pretty close, /help $snicks
Posted By: xDaeMoN

Re: Read from nicks in room. - 29/06/05 03:33 AM

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

Re: Read from nicks in room. - 29/06/05 03:34 AM

Your idea would flood the room if there are a lot of people in the room.
Posted By: BNX

Re: Read from nicks in room. - 29/06/05 03:37 AM

The server I use is very small, never anymore than 15 people in the channel. But thanks smile
Posted By: MikeChat

Re: Read from nicks in room. - 29/06/05 06:35 AM

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.
Posted By: Kelder

Re: Read from nicks in room. - 29/06/05 11:39 AM

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...
Posted By: MikeChat

Re: Read from nicks in room. - 29/06/05 07:21 PM

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
© 2019 mIRC Discussion Forums