mIRC Home    About    Download    Register    News    Help

Topic Options
#211758 - 30/04/09 02:14 AM Showing Quit Reason
Deezmon Offline
Pikka bird

Registered: 30/04/09
Posts: 17
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.

Top
#211762 - 30/04/09 04:16 AM Re: Showing Quit Reason [Re: Deezmon]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
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 }


Top
#211765 - 30/04/09 04:33 AM Re: Showing Quit Reason [Re: RusselB]
Deezmon Offline
Pikka bird

Registered: 30/04/09
Posts: 17
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


Edited by Deezmon (30/04/09 04:37 AM)

Top
#211769 - 30/04/09 06:48 AM Re: Showing Quit Reason [Re: Deezmon]
5618 Offline
Hoopy frood

Registered: 18/06/07
Posts: 933

Top
#211776 - 30/04/09 01:55 PM Re: Showing Quit Reason [Re: Deezmon]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
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.


Top
#211777 - 30/04/09 02:05 PM Re: Showing Quit Reason [Re: Deezmon]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlδnge
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.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#211778 - 30/04/09 02:38 PM Re: Showing Quit Reason [Re: sparta]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
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

Top
#211784 - 30/04/09 09:07 PM Re: Showing Quit Reason [Re: Horstl]
Deezmon Offline
Pikka bird

Registered: 30/04/09
Posts: 17
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.


Edited by Deezmon (30/04/09 09:21 PM)

Top
#211787 - 30/04/09 10:16 PM Re: Showing Quit Reason [Re: Deezmon]
Horstl Offline
Hoopy frood

Registered: 03/11/06
Posts: 1559
Loc: Germany
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

Top
#211788 - 30/04/09 10:25 PM Re: Showing Quit Reason [Re: Horstl]
Deezmon Offline
Pikka bird

Registered: 30/04/09
Posts: 17
Okay it worked, Thank you very much for the code and your patience ^^

Top
#211797 - 01/05/09 01:26 AM Re: Showing Quit Reason [Re: Deezmon]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
On behalf of the people that helped, you're welcome.

Top