Vegito commented on a Page, Online mods (need help)  -  Oct 02, 2015

Try this:

ON *:TEXT:!mods*:#: {
  var %i = $nick($chan,0,o)
  while (%i) {
    if ($nick($chan,%i,o)) var %tmod = $addtok(%tmod, $v1 $+ $chr(44), 32)
    dec %i
  }
  msg $chan Online mods: $iif(%tmod, $left($sorttok(%tmod, 32), -1), None)
}
Ireliavent  -  Oct 02, 2015

Thanks for the reply, but it didn't work for me, sadly. I'll give you two pictures that are relevant to this on a imgur thread below. Also note that I am using the ON :TEXT::#: {*, it's just not showing as I'm using a larger script.

Link to script & return: http://imgur.com/a/PCkCe

Vegito  -  Oct 02, 2015

Do you have multiple on text event scripts in one file?
If thats the case try loading the script I've posted above in a new file.

Also I've updated the script above.

You can also do it like the following:

ON *:TEXT:!mods*:#: {
  var %i = $nick($chan,0)
  while (%i) {
    if ($nick($chan,%i) isop $chan) var %tmod = $addtok(%tmod, $v1 $+ $chr(44), 32)
    dec %i
  }
  msg $chan Online mods:  $iif(%tmod, $left($sorttok(%tmod, 32), -1), None)
}

This will also mention the F, CF, SoP if the server you on supports them.

Ireliavent  -  Oct 02, 2015

I believe I found what's the cause of the problem. Twitch doesn't accept the normal term "isop", as in ($nick isop $chan), instead we have to use an alias. I called the alias "ismod". I'm going to print it in another thread.

Are you able to make this work using an alias to decide whether a user is mod or not? If so, are you able to display their names?
And I don't need the F, CF, SoP and AoP (if it takes up extra space).

EDIT: I do REALLY appreciate the work you are putting in to help me solve this.

Charus  -  Oct 03, 2015

isop is not a twitch term... Its an mIRC identifier... You use that for a twitch channel? Do you request membership so you can see the users list?

edit: Do not create a variable inside a loop, each time you pass the loop the variable will be created again and again...
If you need more help join #mirc channel at freenode

Vegito  -  Oct 04, 2015

@Ireliavent I've never used Twitch before no idea how it works.

Charus  -  Oct 04, 2015

First of all you need to send a CAP request to be able to see the userlist. Im like 99% sure he didnt send that command and he is not able to get the users of the channel. the command is:


on *:CONNECT:{
if (twitch.tv isin $server) {
CAP REQ :twitch.tv/commands
CAP REQ :twitch.tv/membership
echo -se Membership request send!
}
}

Sign in to comment

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.