mIRC Home    About    Download    Register    News    Help

Print Thread
Showing Quit Reason #211758 30/04/09 01:14 AM
Joined: Apr 2009
Posts: 17
D
Deezmon Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2009
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.

Re: Showing Quit Reason [Re: Deezmon] #211762 30/04/09 03:16 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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 }


Re: Showing Quit Reason [Re: RusselB] #211765 30/04/09 03:33 AM
Joined: Apr 2009
Posts: 17
D
Deezmon Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2009
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

Last edited by Deezmon; 30/04/09 03:37 AM.
Re: Showing Quit Reason [Re: Deezmon] #211769 30/04/09 05:48 AM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933

Re: Showing Quit Reason [Re: Deezmon] #211776 30/04/09 12:55 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.


Re: Showing Quit Reason [Re: Deezmon] #211777 30/04/09 01:05 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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,.) }
Re: Showing Quit Reason [Re: sparta] #211778 30/04/09 01:38 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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

Re: Showing Quit Reason [Re: Horstl] #211784 30/04/09 08:07 PM
Joined: Apr 2009
Posts: 17
D
Deezmon Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2009
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.

Last edited by Deezmon; 30/04/09 08:21 PM.
Re: Showing Quit Reason [Re: Deezmon] #211787 30/04/09 09:16 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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

Re: Showing Quit Reason [Re: Horstl] #211788 30/04/09 09:25 PM
Joined: Apr 2009
Posts: 17
D
Deezmon Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2009
Posts: 17
Okay it worked, Thank you very much for the code and your patience ^^

Re: Showing Quit Reason [Re: Deezmon] #211797 01/05/09 12:26 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
On behalf of the people that helped, you're welcome.