mIRC Homepage
Posted By: Deezmon Showing Quit Reason - 30/04/09 01:14 AM
Hi all, I am using mIRC 6.31 with nonamescript v4.21

Normally when you see someone quitting you will see Deezmon [*.*.*.*] has Quit IRC.

When looking through options, I see all of thenotification buttons and checked the ones I wanted, but haven't seen anything showing how to add a quit reason into the notification (For example adding [Reason: Disconnect from Server] added onto the end of the quit message above). I am not sure if it is because of noname script, a missing option, or what, but it would help a lot if there was a way to add that in instead of having to switch clients, etc.
Posted By: RusselB Re: Showing Quit Reason - 30/04/09 03:16 AM
If this doesn't work, it's because there's something in a script that you are already running that stops it.
Code:
on ^*:quit:{ echo -a $nick has quit $network for $1- | haltdef }

Posted By: Deezmon Re: Showing Quit Reason - 30/04/09 03:33 AM
It made it a little different now. Instead of showing the greyed out text thats normal for nnscript it would show normal white text saying:
Deezmon has quit Staticbox for Client Quit
in only the main channel open, even if the person wasnt in that chat.. sort of wierd. I want to try to get it similar to this:
http://img2.imageshack.us/img2/1152/nnscript.png
Where if you see the user Slaktarn, in that format. (That is not my client)

Edit: Sorry, had a bad link
Posted By: 5618 Re: Showing Quit Reason - 30/04/09 05:48 AM
https://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=205203&page=0#Post205203
Posted By: Horstl Re: Showing Quit Reason - 30/04/09 12:55 PM
Your current quit display is colored by your script, and you want to change this display - so you want to modify a modification. A modification that is hidden somewhere in your script.
Adding another quit definition (instead of changing your current definition) *may* work (RusselB's code worked), but it won't blend 100% in your script.

I see these options:
- You ask those who wrote/support your script how to change the quit display. They know the script a lot better than we do.
- You find the relevant piece of code in the script, post it here, and we'll try to help. You can find all the potential parts by searching all your remote scripts for ":quit:", but you'll need basic to average scripting knowledge to identify the "right" piece of code.
- You ask the person who created that screenshot. laugh He/she knows what to change in the script (or it's settings) to append the quit reason to the quit message. I suppose there's a switch for it and you didn't find it yet.

Posted By: sparta Re: Showing Quit Reason - 30/04/09 01:05 PM
The code you looking for look like:
Code:
on &^*:quit:{
  haltdef
  var %c = $comchan($nick,0)
  while (%c) {
    var %e = $thmev($comchan($nick,%c))
    if (%e isnum 0-1) { %e = -ti12c quit $comchan($nick,%c) }
    elseif (%e == 2) { %e = -sti12c quit }
    elseif (%e == 3) {
      %e = -sti12c quit
      echo %e     02 —›12 quit: $thmbr($nick) $thmbr($address) $thmbr($1-)
      %e = -ti12c quit $comchan($nick,%c)
    }
    elseif (%e == 4) { goto skip }
    echo %e     02 —›12 quit: $thmbr($nick) $thmbr($address) $thmbr($1-)
    :skip
    dec %c
  }
  if (%qryevent) && ($query($nick)) && (q isin %qrytypes) {
    echo -ti12c quit $nick     02 —›12 quit: $thmbr($nick) $thmbr($address) $thmbr($1-)
  }
}

and can be found in the remote section in a file named theme.nns .

The alias thmbr is located in the same file and look like:
Code:
alias thmbr {
  if ($1- != $null) {
    return 02(12 $+ $1- $+ 02)12
  }
}

And the alias thmev can be found in the same file, and look like:
Code:
alias thmev {
  if (%thmevnt. [ $+ [ $1 ] $+ ] . [ $+ [ $event ] ]) { return $v1 }
  elseif (%thmevnt.default. [ $+ [ $event ] ]) { return $v1 }
  else { return 0 }
}

I'm not shure what you trying to do, so i leave it to people that know what you looking for.
Posted By: Horstl Re: Showing Quit Reason - 30/04/09 01:38 PM
Thanks, this confirms a switch, but not the one I hoped for...
Ths code you found uses the variable "%thmevnt.default.quit" as a general switch, defining the output location of quit echoes (which may be overridden by a channel-based setting), and this switch will (disregarding query windows):
- if not set or set to "1", echo themed quits in comchans (with quit message)
- if set to "2", echo themed quits in the status window (with quit message)
- if set to "3", echo themed quits in the status window and in comchans (with quit message)
- if set to "4", don't echo any quits
... so, if I don't miss something, it should append the quit message in any case, as long as there's a quit message... confused

To the OP, do you find this code in your scripts? If yes, what's the output of:
Code:
//echo -a default quit setting is: %thmevnt.default.quit


Edit: but then, the theme doesn't match the screenshot... looks like it uses more/other code
Posted By: Deezmon Re: Showing Quit Reason - 30/04/09 08:07 PM
Sorry for the late reply. I tried the first method and it didnt work. This is what I get when I search for the On &^* Quit message:

Code:
on &^*:quit:{
haltdef
var %c = $comchan($nick,0)
while (%c) {
var %e = $thmev($comchan($nick,%c))
if (%e isnum 0-1) { %e = -ti12c quit $comchan($nick,%c) }
elseif (%e == 2) { %e = -sti12c quit }
elseif (%e == 3) {
%e = -sti12c quit
echo %e                  11• $nick $thmbr($address) has quit 15IRC
%e = -ti12c quit $comchan($nick,%c)
}
elseif (%e == 4) { goto skip }
echo %e                  11• $nick $thmbr($address) has quit 15IRC
:skip
dec %c
}
if (%qryevent) && ($query($nick)) && (q isin %qrytypes) {
echo -ti12c quit $nick                  11• $nick $thmbr($address) has quit 15IRC
}
}


And the Image I just went on google and found the one that resembled what my problem was.

As for the script:
Code:
//echo -a default quit setting is: %thmevnt.default.quit


I couldnt find it anywhere in my script.
Posted By: Horstl Re: Showing Quit Reason - 30/04/09 09:16 PM
Ok, thats fine, as your code (your theme) is very similar to the one posted by sparta. Try the following modification of it (replacing your code):
Code:
on &^*:quit:{
  haltdef
  var %c = $comchan($nick,0)
  while (%c) {
    var %e = $thmev($comchan($nick,%c))
    if (%e isnum 0-1) { %e = -ti12c quit $comchan($nick,%c) }
    elseif (%e == 2) { %e = -sti12c quit }
    elseif (%e == 3) {
      %e = -sti12c quit
      echo %e                  11• $nick $thmbr($address) has quit 15IRC $thmbr($1-)
      %e = -ti12c quit $comchan($nick,%c)
    }
    elseif (%e == 4) { goto skip }
    echo %e                  11• $nick $thmbr($address) has quit 15IRC $thmbr($1-)
    :skip
    dec %c
  }
  if (%qryevent) && ($query($nick)) && (q isin %qrytypes) {
    echo -ti12c quit $nick                  11• $nick $thmbr($address) has quit 15IRC $thmbr($1-)
  }
}

Edit: fixed a paste quirk
Posted By: Deezmon Re: Showing Quit Reason - 30/04/09 09:25 PM
Okay it worked, Thank you very much for the code and your patience ^^
Posted By: RusselB Re: Showing Quit Reason - 01/05/09 12:26 AM
On behalf of the people that helped, you're welcome.
© mIRC Discussion Forums