!userlist command

By TrueCoppa on Mar 02, 2010

This is a small command that you can use for a bot.. It's relatively simple.

(Please pardon my messy scripting, I'm not too organised when it comes to writing scripts.. Mainly trial and error)

..:: WARNING ::..
This script can heavily spam depending on the channel that it is used on.. Use at your own risk.

..:: ADDITIONAL NOTES ::..
• Do not criticise because of lack of timers.. I designed this for my bot which has netadmin which thusly means it does not need use of timers.

• I have been scripting in mIRC for a long time, so please do not treat me like a noob.

• This is old, sorry about using set instead of var.

on *:TEXT:!userlist*:#: {
if ($2 == $null) { msg $chan 4USAGE: !userlist <channel> | HALT }
elseif ($me !ison $2) { msg $chan 4ERROR: I cannot scan $2 as I am not in it. | HALT }
else {
msg $chan 12..::13 Userlist of $2 $+ 12 ::..
msg $chan 13There are 12 $+ $nick($2,0) $+  13users in $2 $+ .
set %ulist 0
}
while (%ulist < $nick($2,0)) {
inc %ulist
msg $chan 12 $+ %ulist $+ : $nick($2,%ulist)
}
while (%ulist == $nick($2,0)) {
unset %ulist
HALT
}
}

Comments

Sign in to comment.
Powerkip   -  Feb 28, 2011

HARRO AGAIN

 Respond  
TrueCoppa   -  Mar 14, 2010

Huh oh I feel like such an idiot..
When uploading I changed all %hax to %ulist, I appear to have forgotten that one.

My bad =x

 Respond  
TrueCoppa   -  Mar 14, 2010

Jethro_, come to irc.teamdrd.com in #TC and you can see it works :3

 Respond  
Jethro   -  Mar 08, 2010

TrueCoppa, you don't happen to have a copy of mirc that relays to your belief telepathically, do you? It won't work without changing %hax to %ulist.

 Respond  
TrueCoppa   -  Mar 08, 2010

Napa182, it outputs the name for me when I use it O_o

 Respond  
napa182   -  Mar 07, 2010

TrueCoppa Said:

Napa182, the hax thing is just a joke we run around on the network I'm on

well maybe you should take that %hax var out an use the right var in the snippet cuz without the right var the snippet does not work the way it should.
unless you only want it to do numbers and not say the nicks...

 Respond  
TrueCoppa   -  Mar 07, 2010

Blackvenomm666, everyone's scripting style is different. If it works, that's all that matters. I usually keep my scripts to myself, so I script it messily =x

TheNitelyfe, Basically what I said in the above comment, I like my scripting style =x

Napa182, the hax thing is just a joke we run around on the network I'm on

Jethro_, a friend of mine has a scripting style very similar to yours, I just like my messy style hehehe

 Respond  
TheNitelyfe   -  Mar 03, 2010
on *:TEXT:!uzerlist *:#:{
  var %c $2
  if (!%c) || ($me !ison %c) { msg # 4 $iif(!$2,USAGE: !userlist <channel>,ERROR: I can't scan $2 as I'm not in it.) }
  else {
    msg $chan 12..::13 Userlist of %c $+ 12 ::..
    tokenize 62 $regsubex($str(@,$nick(%c,0)),/./g,12 $+ \n $+ 13:12 $nick(%c,\n) >)
    msg $chan 13There are 12 $+ $0 $+  13users in %c $+ .
    msg $chan $*
  }
}

Looks better imo

 Respond  
blackvenomm666   -  Mar 02, 2010

even to me it looks sloppy and i AM a noob

 Respond  
napa182   -  Mar 02, 2010

you can also change the

 if (!$2) { msg # 4USAGE: !userlist <channel> }
  elseif ($me !ison $2) { msg # 4ERROR: I can't scan $2 as I'm not in it. }

to

if (!$2 || $me !ison $2) { msg # 4 $iif(!$2,USAGE: !userlist <channel>,ERROR: I can't scan $2 as I'm not in it.) }

but whatever makes no diff....

 Respond  
Jethro   -  Mar 02, 2010

I believe that's a typo. Here is it, which looks better and less messy:

on *:text:!userlist*:#: {
  if (!$2) { msg # 4USAGE: !userlist <channel> }
  elseif ($me !ison $2) { msg # 4ERROR: I can't scan $2 as I'm not in it. }
  else { var %u = 1 | while (%u <= $nick($2,0)) { msg # 12 $+ %u $+ : $nick($2,%u) | inc %u } }
}
 Respond  
napa182   -  Mar 02, 2010

um where did %hax come from?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.