mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
mIRC Help Jump to new posts
Re: Multiple instances of mIrc goblin58 18/09/19 02:39 AM
So I resolved this using the -r option and symbolic links. Works fine.
1 128 Read More
Scripts & Popups Jump to new posts
Re: Fix needed for raw output Orobas 17/09/19 04:59 PM
cry oh man...... ended up going hashtables and everthing plus having to halt raw312 .... script is fixed and running now though thanks to Degausser. This is what we ended up with

Code
raw 311:*: {
  .msg #ops $2 $+ 's whois ID: $+($3,@,$4) and Real Name is: $6- | halt
}
raw 314:*: {
  ;.msg #ops $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6-
  if ($hasActiveSearch(314,$2)) {
    haltdef
    sendToUser $numeric $2 10 $2 $+ 's whowas ID: $+($3,@,$4) and Real Name was: $6-
  }
}

raw 406:*: {
  if ($hasActiveSearch(314,$2)) {
    haltdef
    sendToUser 314 $2 $2 $+ 's whowas information could not be found
  }
}

raw 369:*: {
  if ($hasActiveSearch(314,$2)) {
    haltdef
    removeRawUser 314 $2
  }
}

on *:text:*:#ops: {
  if ($nick isop $chan) && ($regex($1-,/(^|\s)(.idshow?w?s?\s\S+)/i)) {
    tokenize 32 $regml(2) | whois $2
  }
  if ($nick isop $chan) && ($regex($1-,/(^|\s)(.lastid?d?s?\s\S+)/i)) {
    addRawUser 314 $2 $nick
    if (!$hasActiveSearch(314,$2)) tokenize 32 $regml(2) | whowas $2
  }
}

;/addRawUser [rawEventId] [searchTerm/searchForUser] [searchByUser]
alias -l addRawUser {
  var %search = $2, %user = $3, %table = $+(event_search_table_,$1), %table2 = event_search_max
  if (!$hget(%table)) .hmake %table 2
  if (!$hget(%table2)) .hmake %table2 2
  if ($len($hget(%table,%search))) hadd %table %search $addtok($hget(%table,%search),%user,9)
  else hadd %table %search %user
  if (!$hget(%table2,$+($1,_,$2))) hadd event_search_max $+($1,_,$2) 0
}

;/removeRawUser [rawEventId] [searchTerm/searchForUser]
alias -l removeRawUser {
  var %search = $2, %table = $+(event_search_table_,$1), %table2 = event_search_max
  if ($len($hget(%table,%search))) {
    hdel %table %search
    if ($len($hget(%table2,$+($1,_,%search)))) {
      hdel %table2 $+($1,_,%search)
    }
  }
}

;$hasActiveSearch([rawEventId],[searchTerm/searchForUser])
alias -l hasActiveSearch {
  return $len($hget($+(event_search_table_,$1),$2))
}

;/sendToUser [rawEventId] [searchTerm/searchForUser] [max] [message] (0 for no max)
alias -l sendToUser {
  var %search = $2, %table = $+(event_search_table_,$1)
  if ($len($hget(%table,%search))) {
    var %table2 = event_search_max, %item = $+($1,_,%search)
    if ($len($hget(%table2, %item)) && ($hget(%table2, %item) < $3 || $3 == 0)) {
      hinc %table2 %item
      if ($3 == $hget(%table2, %item)) hdel %table2 %item
      var %users = $hget(%table,%search)
      while ($len(%users)) {
        .msg $gettok(%users,1,9) $4-
        %users = $deltok(%users,1,9)
      }
    }
  }
}
raw 312:*: {
  if ($hasActiveSearch(314,$2)) haltdef
}
2 134 Read More
mIRC Help Jump to new posts
Re: Need help Darkmnm 16/09/19 01:47 AM
Thank you Wims. I greatly appreciate the changed code.
6 276 Read More
Scripts & Popups Jump to new posts
Re: Need help with viewer list random user (Twitch) Blas 15/09/19 08:23 PM
I wrote the $randuser script. It's designed to select a random active user in chat, as I prefer to not have lurkers being called out in chat randomly as that is a huge no-no on Twitch. It also relies on other variables that are created from other scripts that I designed (%streamer, %mychan, etc). It looks like you tried to dissect the randuser script and to maroon's point, you made several errors trying to do so. If you don't care if the user has been active or not, than JohnEricNO's one line suggestion sounds like a perfect solution for your needs. Otherwise, it's probably going to take a bit more effort and work on your part to only have your script select active users. smile

I did take some time and had a look back at the last edit of the randuser script, and it shouldn't be too difficult to have your bot only select active users. The default is 900 seconds (15 minutes), which means that a user had to have said something or done an action in the last 15 minutes to be eligible to be chosen randomly. Just /set %activetime to whatever you want the time to be (in seconds), and /set %mychan to your channel name (or just manually edit your channel name in). You can then use something like:

Code
ON *:TEXT:!slap:#troyl: MSG $chan $nick slaps $randuser $+ .


Added lines in the original code to make the randuser script (hopefully) work now without anything else:

Code
ON *:LOAD: {
  IF (!%activetime) SET %activetime 900
  IF (!$hget(activeusers)) HMAKE activeusers
  IF (!%commonbots) SET %commonbots moobot nightbot revlobot vivbot xanbot wizebot streamelements
}

ON *:CONNECT: IF (($server == tmi.twitch.tv) && (!$hget(activeusers))) HMAKE activeusers

alias randuser {
  VAR %x = 1
  WHILE ($hget(activeusers, %x).item != $null) {
    VAR %nick $v1
    IF (!$1) { IF ((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == other) { IF (((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) && (%nick != $nick)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == notme) { IF (((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) && (%nick != %streamer)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == othernotme) { IF (((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) && (%nick != %streamer) && (%nick != $nick)) VAR %activelist %activelist %nick }
    ELSEIF ($1 == list) { IF ((%nick ison %mychan) || ($calc($hget(activeusers, %nick) + 90) >= %activetime)) VAR %activelist %activelist %nick }
    ELSE BREAK
    INC %x
  }
  IF ($1 == list) RETURN %activelist
  ELSE {
    VAR %randuser $gettok(%activelist, $rand(1, $numtok(%activelist, 32)), 32)
    IF (%randuser != $null) RETURN %randuser
    ELSE RETURN $nick
  }
}

ON *:TEXT:*:%mychan:IF (($nick != twitchnotify) && ($nick != $me) && (!$istok(%commonbots,$nick,32))) activeusers
ON *:ACTION:*:%mychan:IF (($nick != twitchnotify) && ($nick != $me) && (!$istok(%commonbots,$nick,32))) activeusers

alias activeusers HADD -mz activeusers $nick %activetime
3 174 Read More
Developers Jump to new posts
Re: medit.dll 0.2.1 in 2019? Deep3D 15/09/19 10:30 AM
1 169 Read More
mIRC Help Jump to new posts
Re: How to kill or recover a "lost" session ashburry 14/09/19 10:47 AM
Chances are, if you just wait a while the connection will be dropped.

What is the /whois information of yourself and the zombie? Are they the same? Maybe just wait a while and it will go off line. Also you could try closing your mirc and reopening it.

Another possibility is that maybe someone noticed you changed your nick and quickly moved in and registered the nick. You could try multiple ircopers and csops to explain that it was your nick first.
1 78 Read More
Page 2 of 2 1 2